-
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_ipv6: only discard invalid source when assigned to interface #12442
gnrc_ipv6: only discard invalid source when assigned to interface #12442
Conversation
While it is correct to not use an invalid address as a source address, it is incorrect to assume that addresses not assigned to the interface (`idx == -1` in the respective piece of code) are invalid: Other than classic forwarding via a FIB, forwarded packets utilizing a IPv6 routing header will pass this check, like any other packet sent by this node. The source address for these is not on the given node, so e.g. source routing is not possible at the moment.
95a6ea9
to
b5b52c7
Compare
Rebased to current master to include now merged #12440. |
At this point, tests/gnrc_rpl_srh should work, correct? Instead b5b52c7 results like below for me:
|
Interestingly, |
Sometimes, I even hit another assert:
|
Ok, then it is still flakey. I will have another look if it is related or yet another regression introduced since last release. |
Ok, a quick sniff with Wireshark during a test run confirmed to me, that this is the same sniffer syncing issue I already described in the testing procedures of #10392 (the packets are forwarded as they should, but they are not picked up by the |
For the other observation by @cgundogan, I think it picks up a packet previously on the medium, so a syncing issue again. |
(I don't see any ICMPv6 error messages nor second UDP packet on the TAP interface during the run of those specific tests, even when they fail) |
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.
The fix is sensible and tests/gnrc_rpl_srh
runs successful (excluding the sporadic failures due to scapy sniffer running out-of-sync)
Has someone retested this as well? |
From #11970:
The address is still set to VAL on native for me. I try to get my hands on a pi for the 6lo-nd test |
I confirm now that this PR does not change the following behaviour:
|
Thanks for the review and testing! |
Backport provided in #12458 |
Contribution description
While it is correct to not use an invalid address as a source address, it is incorrect to assume that addresses not assigned to the interface (
idx == -1
in the respective piece of code) are invalid: Other than classic forwarding via a FIB, forwarded packets utilizing a IPv6 routing header will pass this check, like any other packet sent by this node. The source address for these is not on the given node, so e.g. source routing is not possible at the moment.Testing procedure
Testing procedures from #11970 should still work (was unable to test this atm due to lacking hardware).
With #12440 merged
tests/gnrc_rpl_srh
passes (requiresdist/tools/tapsetup/tapsetup
to be called before and also must be called withsudo
).Issues/PRs references
Follow-up to #11970
Fixes parts of #12436
Accompanies #12440