Skip to content

udp, icmp, raw socket can_recv() doesn't take into account buffer padidng. #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Dirbaio opened this issue Oct 21, 2024 · 1 comment
Open

Comments

@Dirbaio
Copy link
Member

Dirbaio commented Oct 21, 2024

in sockets using PacketBuffer (udp, icmp, raw) the receive path calls dequeue_padding() before doing the actual recieve. However, can_recv() doesn't do so, which means it's possible it returns true but then actually trying to receive yields no received data.

@FalkAurel
Copy link

FalkAurel commented Mar 12, 2025

@Dirbaio have you found a solution to that problem yet? It persists into the 0.12.0 version. Would be much appreciated if you could share a workaround.
What doesn't click with me is the second sentence, the recv does not yield data even though it is calling dequeue_padding() internally. So the issue is not with the RingBuffer, but with the interface?

Thank you for your time in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants