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: fix for border router with non-6lo interfaces #19900

Merged
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
2 changes: 2 additions & 0 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ _nib_offl_entry_t *_nib_abr_iter_pfx(const _nib_abr_entry_t *abr,
* @return NULL, if @p last is the last ABR in the NIB.
*/
_nib_abr_entry_t *_nib_abr_iter(const _nib_abr_entry_t *last);
#else
#define _nib_abr_iter(abr) NULL
#endif

/**
Expand Down
22 changes: 11 additions & 11 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ void _handle_snd_mc_ra(gnrc_netif_t *netif)

void _snd_rtr_advs(gnrc_netif_t *netif, const ipv6_addr_t *dst, bool final)
{
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C)
_nib_abr_entry_t *abr = NULL;

DEBUG("nib: Send router advertisements for each border router:\n");
while ((abr = _nib_abr_iter(abr))) {
DEBUG(" - %s\n", ipv6_addr_to_str(addr_str, &abr->addr,
sizeof(addr_str)));
_snd_ra(netif, dst, final, abr);
if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C) && gnrc_netif_is_6lr(netif)) {
_nib_abr_entry_t *abr = NULL;

DEBUG("nib: Send router advertisements for each border router:\n");
while ((abr = _nib_abr_iter(abr))) {
DEBUG(" - %s\n", ipv6_addr_to_str(addr_str, &abr->addr,
sizeof(addr_str)));
_snd_ra(netif, dst, final, abr);
}
} else {
_snd_ra(netif, dst, final, NULL);
}
#else /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
_snd_ra(netif, dst, final, NULL);
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
}

static gnrc_pktsnip_t *_offl_to_pio(_nib_offl_entry_t *offl,
Expand Down