@@ -552,14 +552,9 @@ static void _handle_mtuo(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
552552static uint32_t _handle_rdnsso (gnrc_netif_t * netif , const icmpv6_hdr_t * icmpv6 ,
553553 const ndp_opt_rdnss_impl_t * rdnsso );
554554#endif
555- #if IS_ACTIVE (CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C )
556555static uint32_t _handle_pio (gnrc_netif_t * netif , const icmpv6_hdr_t * icmpv6 ,
557556 const ndp_opt_pi_t * pio ,
558557 _nib_abr_entry_t * abr );
559- #else /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
560- static uint32_t _handle_pio (gnrc_netif_t * netif , const icmpv6_hdr_t * icmpv6 ,
561- const ndp_opt_pi_t * pio );
562- #endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
563558static uint32_t _handle_rio (gnrc_netif_t * netif , const ipv6_hdr_t * ipv6 ,
564559 const ndp_opt_ri_t * pio );
565560/** @} */
@@ -688,8 +683,8 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
688683
689684#if IS_ACTIVE (CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C )
690685 sixlowpan_nd_opt_abr_t * abro = NULL ;
691- _nib_abr_entry_t * abr = NULL ;
692686#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
687+ _nib_abr_entry_t * abr = NULL ;
693688 uint32_t next_timeout = UINT32_MAX ;
694689
695690 assert (netif != NULL );
@@ -789,9 +784,8 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
789784 }
790785 else {
791786 dr = _nib_drl_get (& ipv6 -> src , netif -> pid );
792-
793- DEBUG ("nib: router lifetime was 0. Removing router and routes via it." );
794787 if (dr != NULL ) {
788+ DEBUG ("nib: router lifetime was 0. Removing router and routes via it.\n" );
795789 _handle_rtr_timeout (dr );
796790 }
797791 dr = NULL ;
@@ -844,15 +838,9 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
844838 break ;
845839 case NDP_OPT_PI : {
846840 uint32_t min_pfx_timeout ;
847- #if IS_ACTIVE (CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C )
848841 min_pfx_timeout = _handle_pio (netif ,
849842 (const icmpv6_hdr_t * )rtr_adv ,
850843 (ndp_opt_pi_t * )opt , abr );
851- #else /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
852- min_pfx_timeout = _handle_pio (netif ,
853- (const icmpv6_hdr_t * )rtr_adv ,
854- (ndp_opt_pi_t * )opt );
855- #endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
856844 next_timeout = _min (next_timeout , min_pfx_timeout );
857845
858846 /* notify optional PIO consumer */
@@ -1702,13 +1690,8 @@ static inline bool _multihop_p6c(gnrc_netif_t *netif, _nib_abr_entry_t *abr)
17021690#define _multihop_p6c (netif , abr ) (false)
17031691#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
17041692
1705- #if IS_ACTIVE (CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C )
17061693static uint32_t _handle_pio (gnrc_netif_t * netif , const icmpv6_hdr_t * icmpv6 ,
17071694 const ndp_opt_pi_t * pio , _nib_abr_entry_t * abr )
1708- #else /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
1709- static uint32_t _handle_pio (gnrc_netif_t * netif , const icmpv6_hdr_t * icmpv6 ,
1710- const ndp_opt_pi_t * pio )
1711- #endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
17121695{
17131696 uint32_t valid_ltime ;
17141697 uint32_t pref_ltime ;
@@ -1764,11 +1747,9 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
17641747 }
17651748 if ((pfx = _nib_pl_add (netif -> pid , & pio -> prefix , pio -> prefix_len ,
17661749 valid_ltime , pref_ltime ))) {
1767- #if IS_ACTIVE (CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C )
17681750 if (abr != NULL ) {
17691751 _nib_abr_add_pfx (abr , pfx );
17701752 }
1771- #endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
17721753 if (pio -> flags & NDP_OPT_PI_FLAGS_L ) {
17731754 pfx -> flags |= _PFX_ON_LINK ;
17741755 }
0 commit comments