mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_ipv6_nib: fix for border router with non-6lo interfaces
A border router should not send router advertisements on it's 6LoWPAN interfaces, but if it also has classic IPv6 downstream interfaces it should very much do so.
This commit is contained in:
parent
210c4f4d96
commit
d38379688d
@ -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
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
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);
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user