gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up #20259
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_local
when 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 term
Connect 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
atwinc15x0
driver has an internal API to join a L2 multicast groupm2m_wifi_enable_mac_mcast()
which is called whenNETOPT_L2_GROUP
orNETOPT_L2_GROUP_LEAVE
are sent to the driver.TLDR: The
netif
reset 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::1
is received anymore. The fix in my opinion is, as you can see in the PR, to leaveipv6_addr_all_nodes_link_local
when the interface is brought down and rejoin the group when it is brought up.Repeat the testing procedure with this fix and an
atwinc15x0
and you will see that the RA is received and a global address is configured successfully.Issues/PRs references