gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up#20259
Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom Jan 16, 2024
Merged
Conversation
benpicco
reviewed
Jan 15, 2024
33cd3b7 to
720fc49
Compare
benpicco
reviewed
Jan 16, 2024
720fc49 to
ab3f77e
Compare
benpicco
approved these changes
Jan 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
An interface should rejoin the
ipv6_addr_all_nodes_link_localwhen brought up.We had a very annoying problem that sometimes a global address could not be configured on an
atwinc15x0.This PR shows how to trigger the problem and what fixes it.
Testing procedure
make -C examples/gnrc_networking flash termConnect to some access point.
The interface gets a global address.
Disconnect from the AP.
Delete the global address.
Now reset the interface.
Try to connect again.
You will see that no global address is configured.
No global address could be configured even though I can see in Wireshark that the the exchange of RS and RA is happening.
You can see that the RA is sent to L2 multicast address
33:33:00:00:00:1, which is the L2 multicast group which is joined when the APIgnrc_netif_ipv6_group_join_internal(netif,&ipv6_addr_all_nodes_link_local)is called. But this is only called once for every interface ingnrc_ipv6_nib_init_iface.The
atwinc15x0driver has an internal API to join a L2 multicast groupm2m_wifi_enable_mac_mcast()which is called whenNETOPT_L2_GROUPorNETOPT_L2_GROUP_LEAVEare sent to the driver.TLDR: The
netifreset is calling the driversinit()function again and I strongly assume thatm2m_wifi_init()makes the WiFi chip leave the L2 multicast group, which is why no RA toff02::1is received anymore. The fix in my opinion is, as you can see in the PR, to leaveipv6_addr_all_nodes_link_localwhen the interface is brought down and rejoin the group when it is brought up.Repeat the testing procedure with this fix and an
atwinc15x0and you will see that the RA is received and a global address is configured successfully.Issues/PRs references