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) |
cgundogan
left a comment
There was a problem hiding this comment.
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 == -1in 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_srhpasses (requiresdist/tools/tapsetup/tapsetupto be called before and also must be called withsudo).Issues/PRs references
Follow-up to #11970
Fixes parts of #12436
Accompanies #12440