-
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: check validity of preconfigured source on send #11970
gnrc_ipv6: check validity of preconfigured source on send #11970
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 :-/ |
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.
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 |
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.
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_DEBUG
to 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=1
pinging should still work from both sides.Classic ND should work as expected. To test this I used
radvd
on my host system with the following configIf using
native
(withdist/tools/tapsetup/tapsetup
to 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.