gnrc_icmpv6_error / gnrc_ipv6: fixes for unspecified address#10421
gnrc_icmpv6_error / gnrc_ipv6: fixes for unspecified address#10421bergzand merged 3 commits intoRIOT-OS:masterfrom
Conversation
|
Note to self, compile test code from yesterday night, even if you think you did... |
|
Wit this PR, I'm unable to trigger a Destination unreachable from a native instance by sending an UDP frame :/ |
|
I don't understand your ":/". Isn't this a good thing? Or do you mean something else than described in #10419? |
| if (ipv6_addr_is_unspecified(&ipv6_hdr->src)) { | ||
| ipv6 = NULL; | ||
| } | ||
| return NULL; |
There was a problem hiding this comment.
Shouldn't this be ipv6 instead of NULL?
There was a problem hiding this comment.
Can only quote myself here ...
Note to self, compile test code from yesterday night, even if you think you did...
What I was trying to say is that I don't get a Destination Unreachable response anymore for "valid" cases where I expect to receive a Destination Unreachable from the instance, so for example with: |
|
Yepp... Fixed that. |
|
I was also wondering if multicast addresses should be filtered out. Is it valid to respond with an ICMPv6Error to a frame with a multicast address as source (and transmit the error response to a multicast address) |
|
To expand my previous comment, should I receive an error response from a frame like this? Assuming there is nothing listening on UDP port 1337 on the instance. And should the error then have the multicast address as destination |
Yes of course there should also be an error message.
No why? We send the packet back as always to the source of the IPv6 packet and that's the only interested party. |
|
Ahh... I get what you mean now. You are right! Multicast should be filtered out as well, but let me check if |
|
Fixed and also amended the new behavior to the documentation. |
Thanks! ACK, please squash! |
8837860 to
b37d43c
Compare
|
Squashed and rebased |
Check for: - if it exists (critical error condition -- non-IPv6 headers should not trigger these functions) => assert - if it has a multicast source (that shouldn't really happen but people might try weird stuff ;-) - if it has an unspecified source (can't determine receiver of error message => don't send it, don't build it)
It just doesn't makes sense to handle them any further
b37d43c to
0bdbb68
Compare
|
Fixed and |
|
👍 on the force push |
|
Murdock's happy :-) |
|
And go! |
Contribution description
This fixes the two bugs regarding the unspecified address I described in #10419 (comment)
Testing procedure
Repeat the steps to reproduce in #10419. The expected results (except for probing neighbor solicitations which are legitimate) should come to be.
Issues/PRs references
Fixes #10419.