Skip to content
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/nib: rejoin ipv6_addr_all_nodes_link_local on interface up #20259

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up
  • Loading branch information
fabian18 committed Jan 16, 2024
commit ab3f77e6733a7e909c05abb89381c0288beeaa24
2 changes: 0 additions & 2 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-router.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ static inline void _init_iface_router(gnrc_netif_t *netif)
if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR)) {
netif->flags |= GNRC_NETIF_FLAGS_6LO_ABR;
}

gnrc_netif_ipv6_group_join_internal(netif, &ipv6_addr_all_routers_link_local);
}

/**
Expand Down
19 changes: 12 additions & 7 deletions sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@
_init_iface_arsm(netif);
netif->ipv6.rs_sent = 0;
netif->ipv6.na_sent = 0;
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER)
if (gnrc_netif_ipv6_group_join_internal(netif, &ipv6_addr_all_routers_link_local)) {
DEBUG("nib: Can't join link-local all-routers on interface %u\n", netif->pid);
}
#endif
if (gnrc_netif_ipv6_group_join_internal(netif, &ipv6_addr_all_nodes_link_local) < 0) {
DEBUG("nib: Can't join link-local all-nodes on interface %u\n", netif->pid);
}
benpicco marked this conversation as resolved.
Show resolved Hide resolved
_add_static_lladdr(netif);
_auto_configure_addr(netif, &ipv6_addr_link_local_prefix, 64U);
if (_should_search_rtr(netif)) {
Expand Down Expand Up @@ -190,6 +198,10 @@
gnrc_netif_ipv6_addr_remove_internal(netif, &netif->ipv6.addrs[i]);
}
}
gnrc_netif_ipv6_group_leave_internal(netif, &ipv6_addr_all_nodes_link_local);
benpicco marked this conversation as resolved.
Show resolved Hide resolved
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER)
gnrc_netif_ipv6_group_leave_internal(netif, &ipv6_addr_all_routers_link_local);
#endif

gnrc_netif_release(netif);
}
Expand All @@ -208,13 +220,6 @@
#endif /* CONFIG_GNRC_IPV6_NIB_SLAAC || CONFIG_GNRC_IPV6_NIB_6LN */
_init_iface_router(netif);
gnrc_netif_init_6ln(netif);
if (gnrc_netif_ipv6_group_join_internal(netif,
&ipv6_addr_all_nodes_link_local) < 0) {
DEBUG("nib: Can't join link-local all-nodes on interface %u\n",
netif->pid);
gnrc_netif_release(netif);
return;
}

gnrc_netif_release(netif);
}
Expand Down Expand Up @@ -527,7 +532,7 @@
icmpv6_len -= (opt->len << 3), \
opt = (ndp_opt_t *)(((uint8_t *)opt) + (opt->len << 3)))

#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER)

Check warning on line 535 in sys/net/gnrc/network_layer/ipv6/nib/nib.c

View workflow job for this annotation

GitHub Actions / static-tests

full block {} expected in the control structure
static void _handle_rtr_sol(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
const ndp_rtr_sol_t *rtr_sol, size_t icmpv6_len)
{
Expand Down
Loading