Skip to content

Commit

Permalink
gnrc_ipv6_nib: add hook for Prefix Information Option
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Sep 2, 2021
1 parent eace949 commit f4828cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions makefiles/pseudomodules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ PSEUDOMODULES += gnrc_ipv6_nib_6lr
PSEUDOMODULES += gnrc_ipv6_nib_dns
PSEUDOMODULES += gnrc_ipv6_nib_rio
PSEUDOMODULES += gnrc_ipv6_nib_router
PSEUDOMODULES += gnrc_ipv6_nib_rtr_adv_pio_cb
PSEUDOMODULES += gnrc_netdev_default
PSEUDOMODULES += gnrc_neterr
PSEUDOMODULES += gnrc_netapi_callbacks
Expand Down
7 changes: 7 additions & 0 deletions sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,13 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
(ndp_opt_pi_t *)opt);
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
next_timeout = _min(next_timeout, min_pfx_timeout);

/* notify optional PIO consumer */
if (IS_USED(MODULE_GNRC_IPV6_NIB_RTR_ADV_PIO_CB)) {
extern void gnrc_ipv6_nib_rtr_adv_pio_cb(gnrc_netif_t *netif,
const ndp_opt_pi_t *pio);
gnrc_ipv6_nib_rtr_adv_pio_cb(netif, (ndp_opt_pi_t *)opt);
}
break;
}
/* ABRO was already secured in the option check above */
Expand Down

0 comments on commit f4828cc

Please sign in to comment.