1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16567 from benpicco/gnrc/nib-runtime_ra

gnrc/nib: fix starting with router advertisements disabled, enabling them at run-time
This commit is contained in:
Martine Lenders 2021-06-18 13:13:00 +02:00 committed by GitHub
commit 241899b2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -118,12 +118,6 @@ gnrc_pktsnip_t *_copy_and_handle_aro(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6
const sixlowpan_nd_opt_ar_t *aro,
const ndp_opt_t *sl2ao);
/**
* @brief Sets the @ref GNRC_NETIF_FLAGS_IPV6_RTR_ADV flags of an interface
*
* @param[in] netif The interface.
*/
void _set_rtr_adv(gnrc_netif_t *netif);
#else /* CONFIG_GNRC_IPV6_NIB_6LR || defined(DOXYGEN) */
#define _rtr_sol_on_6lr(netif, icmpv6) (false)
#define _get_ar_state(nbr) (_ADDR_REG_STATUS_IGNORE)
@ -133,7 +127,6 @@ void _set_rtr_adv(gnrc_netif_t *netif);
*/
#define _copy_and_handle_aro(netif, ipv6, icmpv6, aro, sl2ao) \
(NULL)
#define _set_rtr_adv(netif) (void)netif
#endif /* CONFIG_GNRC_IPV6_NIB_6LR || defined(DOXYGEN) */
#ifdef __cplusplus

View File

@ -46,8 +46,7 @@ static inline void _init_iface_router(gnrc_netif_t *netif)
netif->ipv6.ra_sent = 0;
netif->flags |= GNRC_NETIF_FLAGS_IPV6_FORWARDING;
if (!IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LR) ||
IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR)) {
if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ADV_ROUTER)) {
netif->flags |= GNRC_NETIF_FLAGS_IPV6_RTR_ADV;
}