From: David Lamparter Date: Fri, 21 Jan 2022 15:47:18 +0000 (+0100) Subject: pim6d: remove `PIM_V6_TEMP_BREAK` X-Git-Tag: pim6-testing-20220430~295^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F10400%2Fhead;p=mirror%2Ffrr.git pim6d: remove `PIM_V6_TEMP_BREAK` It's no longer necessary, pim6d now compiles without this hack. Signed-off-by: David Lamparter --- diff --git a/pimd/pim_addr.c b/pimd/pim_addr.c index 2a6b4fe20f..6ba0947c2f 100644 --- a/pimd/pim_addr.c +++ b/pimd/pim_addr.c @@ -44,9 +44,6 @@ static ssize_t printfrr_pimaddr(struct fbuf *buf, struct printfrr_eargs *ea, #if PIM_IPV == 4 return bprintfrr(buf, "%pI4", addr); -#elif !defined(PIM_V6_TEMP_BREAK) - CPP_NOTICE("note IPv6 typing for pim_addr is temporarily disabled."); - return bprintfrr(buf, "%pI4", addr); #else return bprintfrr(buf, "%pI6", addr); #endif diff --git a/pimd/pim_addr.h b/pimd/pim_addr.h index 3c4b5a84d1..1351fca225 100644 --- a/pimd/pim_addr.h +++ b/pimd/pim_addr.h @@ -25,11 +25,7 @@ /* clang-format off */ -/* temporarily disable IPv6 types to keep code compiling. - * Defining PIM_V6_TEMP_BREAK will show a lot of compile errors - they are - * very useful to see TODOs. - */ -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 typedef struct in_addr pim_addr; #define PIM_ADDRSTRLEN INET_ADDRSTRLEN diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c index 3e3021dc4d..c2fe525b2d 100644 --- a/pimd/pim_bfd.c +++ b/pimd/pim_bfd.c @@ -94,7 +94,7 @@ void pim_bfd_info_nbr_create(struct pim_interface *pim_ifp, bfd_sess_set_timers( neigh->bfd_session, pim_ifp->bfd_config.detection_multiplier, pim_ifp->bfd_config.min_rx, pim_ifp->bfd_config.min_tx); -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 bfd_sess_set_ipv4_addrs(neigh->bfd_session, NULL, &neigh->source_addr); #else bfd_sess_set_ipv6_addrs(neigh->bfd_session, NULL, &neigh->source_addr); diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index e25cf11549..a0653e1a57 100644 --- a/pimd/pim_msg.c +++ b/pimd/pim_msg.c @@ -138,7 +138,7 @@ uint8_t *pim_msg_addr_encode_ipv6_group(uint8_t *buf, struct in6_addr addr) return buf; } -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 #define pim_msg_addr_encode(what) pim_msg_addr_encode_ipv4_##what #else #define pim_msg_addr_encode(what) pim_msg_addr_encode_ipv6_##what diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index 72dd28e69a..8c0a551848 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -2031,7 +2031,7 @@ int lib_interface_pim_address_family_use_source_modify( break; case NB_EV_APPLY: ifp = nb_running_get_entry(args->dnode, NULL, true); -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 yang_dnode_get_ipv4(&source_addr, args->dnode, NULL); #else yang_dnode_get_ipv6(&source_addr, args->dnode, NULL); diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index beaa5c802b..e221dd3fa0 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -361,7 +361,7 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr, pim_addr nhaddr; switch (nh->type) { -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 case NEXTHOP_TYPE_IPV4: if (nh->ifindex == IFINDEX_INTERNAL) continue; @@ -605,7 +605,7 @@ static int pim_ecmp_nexthop_search(struct pim_instance *pim, ifps[i] = if_lookup_by_index(nh_node->ifindex, pim->vrf->vrf_id); if (ifps[i]) { -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 pim_addr nhaddr = nh_node->gate.ipv4; #else pim_addr nhaddr = nh_node->gate.ipv6; @@ -799,7 +799,7 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS) nbr = pim_neighbor_find_if(ifp1); /* Overwrite with Nbr address as NH addr */ if (nbr) -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 nexthop->gate.ipv4 = nbr->source_addr; #else nexthop->gate.ipv6 = nbr->source_addr; diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index a5183c9e9b..0346a7067b 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -1366,7 +1366,7 @@ void pim_resolve_rp_nh(struct pim_instance *pim, struct pim_neighbor *nbr) if (nbr->interface != ifp1) continue; -#if PIM_IPV == 4 || !defined(PIM_V6_TEMP_BREAK) +#if PIM_IPV == 4 nh_node->gate.ipv4 = nbr->source_addr; #else nh_node->gate.ipv6 = nbr->source_addr; diff --git a/pimd/subdir.am b/pimd/subdir.am index 8e99b0c010..86e8ca780b 100644 --- a/pimd/subdir.am +++ b/pimd/subdir.am @@ -159,7 +159,7 @@ if DEV_BUILD # (change noinst_ to sbin_ below to install it.) # noinst_PROGRAMS += pimd/pim6d -pimd_pim6d_CFLAGS = $(AM_CFLAGS) -DPIM_IPV=6 $(and $(PIM_V6_TEMP_BREAK),-DPIM_V6_TEMP_BREAK) +pimd_pim6d_CFLAGS = $(AM_CFLAGS) -DPIM_IPV=6 pimd_pim6d_LDADD = lib/libfrr.la $(LIBCAP) endif endif