-
Notifications
You must be signed in to change notification settings - Fork 2k
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
gnrc_sock_udp: accept response from any address if remote is multicast #18854
Merged
benpicco
merged 3 commits into
RIOT-OS:master
from
benpicco:gnrc_sock_udp-_remote_mismatch
Nov 15, 2022
Merged
gnrc_sock_udp: accept response from any address if remote is multicast #18854
benpicco
merged 3 commits into
RIOT-OS:master
from
benpicco:gnrc_sock_udp-_remote_mismatch
Nov 15, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benpicco
requested review from
miri64,
haukepetersen,
PeterKietzmann,
cgundogan and
maribu
as code owners
November 7, 2022 16:09
miri64
reviewed
Nov 7, 2022
benpicco
force-pushed
the
gnrc_sock_udp-_remote_mismatch
branch
from
November 7, 2022 18:48
b59b116
to
e29a6ff
Compare
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Nov 7, 2022
Murdock results✔️ PASSED 920d690 test/gnrc_udp: add test multicast sock
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
benpicco
force-pushed
the
gnrc_sock_udp-_remote_mismatch
branch
from
November 15, 2022 10:21
2e7b891
to
d064feb
Compare
kfessel
approved these changes
Nov 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read this looks good, and i trust @benpicco testing
benpicco
force-pushed
the
gnrc_sock_udp-_remote_mismatch
branch
from
November 15, 2022 10:26
64d4de4
to
920d690
Compare
Thank you for the review! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: network
Area: Networking
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
sock_udp_create()
with a set remote is not just a convenient way to not having to keep the remote around when callingsock_udp_send()
it actually binds the socket to that remote and will drop any response from a different address.This is of course not very practical when the remote is a multicast address as this means all unicast responses are dropped.
This adds a new
SOCK_FLAGS_BIND_REMOTE
flag that gets set automatically for unicast remotes to retain current behavior.This also moves the remote-checking code
sock_udp_recv_buf_aux()
to make it more readable as this was not so straightforward to debug.Testing procedure
A new test case was added to
tests/gnrc_sock_udp
.Issues/PRs references