gnrc_ipv6: check validity of preconfigured source on send#11970
gnrc_ipv6: check validity of preconfigured source on send#11970MrKevinWeiss merged 1 commit intoRIOT-OS:masterfrom
Conversation
Oops, I did not test this case and now all NSs that go out from that address are dropped -.- |
|
Should be working now... But it became very ugly. Maybe someone else has an idea how to make it more beautiful :-/ |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
It took a little bit of looking at but it I don't see a better way around it. I should be able to test tomorrow.
|
I've updated the PR to only check for ND messages when 6Lo-ND is used. Only for 6Lo-ND sending from an unregistered address is allowed. For classic SLAAC, the source address is supposed to be unspecified, so we won't land in this branch. |
|
I've updated the testing procedures to take this into account. |
|
just tested as described, "works" accordingly |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
Now that testing is done it looks ok. ACK!
|
Please squash |
|
Please only set the "needs squashing" label if the CI does not recognize it on its own. Otherwise, unnecessary rebuilds might be required to be triggered. |
659b0eb to
8ff37d8
Compare
|
Squashed. |
|
@miri64 it seems like the binary is too big for the gnrc_ipv6_ext but I can build on my machine and in docker... |
|
Mhhh... will investigate why it uses more RAM (I'd expect it to use more ROM). |
If an address was pre-configured by the upper layer its validity is currently ignored. It is neither checked if the address is on the interface at all nor is it checked if it is valid. This change provides a fix for that by checking both facts.
|
One of these |
8ff37d8 to
7f2cc4f
Compare
|
Heh ya, I just saw that... |
|
Thanks! :-) |
Contribution description
If an address was pre-configured by the upper layer its validity is currently ignored. It is neither checked if the address is on the interface at all nor is it checked if it is valid.
This change provides a fix for that by checking both facts.
Testing procedure
Get your hands on a Raspberry Pi with IEEE 802.15.4 and set it up as a 6LoWPAN border router. Compile and flash
gnrc_networking(without settingGNRC_IPV6_NIB_CONF_SLAAC=1(if you like you can also setENABLE_DEBUGto 1 insys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c) and observeifconfig:note that the global address is still tentative (
TNT). If that address is pinged on master from the Raspberry Pi, the node will reply. With this PR pinging will fail. If you activatedENABLE_DEBUG, you will get something likein the output.
When recompiling and reflashing with
GNRC_IPV6_NIB_CONF_SLAAC=1pinging should still work from both sides.Classic ND should work as expected. To test this I used
radvdon my host system with the following configIf using
native(withdist/tools/tapsetup/tapsetupto create the TAP interfaces) the2001:db8:0:1::address of the node should become valid a few seconds after the node started.Issues/PRs references
The issue was discussed during the last release in RIOT-OS/Release-Specs#128 (comment) and following.