diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2021-06-25 10:53:26 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-11-17 11:17:44 +0100 |
commit | 4efdb9c6282485e48ffd387e10b0a0e116de0bb9 (patch) | |
tree | c3c3e250a1f9c4365913a5e7e545b6ae8da463cb /pimd | |
parent | pimd: actually return msec in timer_remain_msec() (diff) | |
download | frr-4efdb9c6282485e48ffd387e10b0a0e116de0bb9.tar.xz frr-4efdb9c6282485e48ffd387e10b0a0e116de0bb9.zip |
pimd: clean up BSR NHT & fix parallel links
The Bootstrap message RX path needs a RPF check for the BSR address,
and this is implemented both incorrectly as well as quite ugly.
Clean up and fix case when we have multiple interfaces to the same LAN
and/or ECMP nexthops (both would cause message duplication, the former
can even cause BSM forwarding loops.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_bsm.c | 95 | ||||
-rw-r--r-- | pimd/pim_cmd.c | 14 | ||||
-rw-r--r-- | pimd/pim_nht.c | 211 | ||||
-rw-r--r-- | pimd/pim_nht.h | 21 | ||||
-rw-r--r-- | pimd/pim_rp.c | 20 | ||||
-rw-r--r-- | pimd/pim_rpf.c | 2 | ||||
-rw-r--r-- | pimd/pim_upstream.c | 2 | ||||
-rw-r--r-- | pimd/pim_vxlan.c | 4 |
8 files changed, 190 insertions, 179 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 6c4c7eeb5..b7207aa21 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -162,8 +162,6 @@ static int pim_on_bs_timer(struct thread *t) struct bsm_scope *scope; struct bsgrp_node *bsgrp_node; struct bsm_rpinfo *bsrp; - struct prefix nht_p; - bool is_bsr_tracking = true; scope = THREAD_ARG(t); THREAD_OFF(scope->bs_timer); @@ -172,15 +170,7 @@ static int pim_on_bs_timer(struct thread *t) zlog_debug("%s: Bootstrap Timer expired for scope: %d", __func__, scope->sz_id); - /* Remove next hop tracking for the bsr */ - nht_p.family = AF_INET; - nht_p.prefixlen = IPV4_MAX_BITLEN; - nht_p.u.prefix4 = scope->current_bsr; - if (PIM_DEBUG_BSM) - zlog_debug("%s: Deregister BSR addr %pFX with Zebra NHT", - __func__, &nht_p); - pim_delete_tracked_nexthop(scope->pim, &nht_p, NULL, NULL, - is_bsr_tracking); + pim_nht_bsr_del(scope->pim, scope->current_bsr); /* Reset scope zone data */ scope->accept_nofwd_bsm = false; @@ -543,35 +533,6 @@ static void pim_instate_pend_list(struct bsgrp_node *bsgrp_node) pim_bsm_rpinfos_free(bsgrp_node->partial_bsrp_list); } -static bool pim_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr, - struct in_addr ip_src_addr) -{ - struct pim_nexthop nexthop; - int result; - - memset(&nexthop, 0, sizeof(nexthop)); - - /* New BSR recived */ - if (bsr.s_addr != pim->global_scope.current_bsr.s_addr) { - result = pim_nexthop_match(pim, bsr, ip_src_addr); - - /* Nexthop lookup pass for the new BSR address */ - if (result) - return true; - - if (PIM_DEBUG_BSM) { - char bsr_str[INET_ADDRSTRLEN]; - - pim_inet4_dump("<bsr?>", bsr, bsr_str, sizeof(bsr_str)); - zlog_debug("%s : No route to BSR address %s", __func__, - bsr_str); - } - return false; - } - - return pim_nexthop_match_nht_cache(pim, bsr, ip_src_addr); -} - static bool is_preferred_bsr(struct pim_instance *pim, struct in_addr bsr, uint32_t bsr_prio) { @@ -594,35 +555,11 @@ static bool is_preferred_bsr(struct pim_instance *pim, struct in_addr bsr, static void pim_bsm_update(struct pim_instance *pim, struct in_addr bsr, uint32_t bsr_prio) { - struct pim_nexthop_cache pnc; - if (bsr.s_addr != pim->global_scope.current_bsr.s_addr) { - struct prefix nht_p; - bool is_bsr_tracking = true; + if (pim->global_scope.current_bsr.s_addr) + pim_nht_bsr_del(pim, pim->global_scope.current_bsr); + pim_nht_bsr_add(pim, bsr); - /* De-register old BSR and register new BSR with Zebra NHT */ - nht_p.family = AF_INET; - nht_p.prefixlen = IPV4_MAX_BITLEN; - - if (pim->global_scope.current_bsr.s_addr != INADDR_ANY) { - nht_p.u.prefix4 = pim->global_scope.current_bsr; - if (PIM_DEBUG_BSM) - zlog_debug( - "%s: Deregister BSR addr %pFX with Zebra NHT", - __func__, &nht_p); - pim_delete_tracked_nexthop(pim, &nht_p, NULL, NULL, - is_bsr_tracking); - } - - nht_p.u.prefix4 = bsr; - if (PIM_DEBUG_BSM) - zlog_debug( - "%s: NHT Register BSR addr %pFX with Zebra NHT", - __func__, &nht_p); - - memset(&pnc, 0, sizeof(struct pim_nexthop_cache)); - pim_find_or_track_nexthop(pim, &nht_p, NULL, NULL, - is_bsr_tracking, &pnc); pim->global_scope.current_bsr = bsr; pim->global_scope.current_bsr_first_ts = pim_time_monotonic_sec(); @@ -1310,18 +1247,20 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf, } } - /* Mulicast BSM received */ if (ip_hdr->ip_dst.s_addr == qpim_all_pim_routers_addr.s_addr) { - if (!no_fwd) { - if (!pim_bsr_rpf_check(pim, bshdr->bsr_addr.addr, - ip_hdr->ip_src)) { - if (PIM_DEBUG_BSM) - zlog_debug( - "%s : RPF check fail for BSR address %s", - __func__, bsr_str); - pim->bsm_dropped++; - return -1; - } + /* Multicast BSMs are only accepted if source interface & IP + * match RPF towards the BSR's IP address, or they have + * no-forward set + */ + if (!no_fwd + && !pim_nht_bsr_rpf_check(pim, bshdr->bsr_addr.addr, ifp, + ip_hdr->ip_src)) { + if (PIM_DEBUG_BSM) + zlog_debug( + "BSM check: RPF to BSR %s is not %pI4%%%s", + bsr_str, &ip_hdr->ip_src, ifp->name); + pim->bsm_dropped++; + return -1; } } else if (if_address_is_local(&ip_hdr->ip_dst, AF_INET, pim->vrf->vrf_id)) { diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index e5ee7a82a..518fcb00e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4061,17 +4061,9 @@ static void clear_pim_bsr_db(struct pim_instance *pim) struct rp_info *rp_all; struct pim_upstream *up; struct rp_info *rp_info; - bool is_bsr_tracking = true; - /* Remove next hop tracking for the bsr */ - nht_p.family = AF_INET; - nht_p.prefixlen = IPV4_MAX_BITLEN; - nht_p.u.prefix4 = pim->global_scope.current_bsr; - if (PIM_DEBUG_BSM) { - zlog_debug("%s: Deregister BSR addr %pFX with Zebra NHT", - __func__, &nht_p); - } - pim_delete_tracked_nexthop(pim, &nht_p, NULL, NULL, is_bsr_tracking); + if (pim->global_scope.current_bsr.s_addr) + pim_nht_bsr_del(pim, pim->global_scope.current_bsr); /* Reset scope zone data */ pim->global_scope.accept_nofwd_bsm = false; @@ -4119,7 +4111,7 @@ static void clear_pim_bsr_db(struct pim_instance *pim) __func__, &nht_p); } - pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false); + pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info); if (!str2prefix("224.0.0.0/4", &g_all)) return; diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 50cfc297d..b5f26d361 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -110,22 +110,11 @@ static struct pim_nexthop_cache *pim_nexthop_cache_add(struct pim_instance *pim, return pnc; } -/* - * pim_find_or_track_nexthop - * - * This API is used to Register an address with Zebra - * - * 1 -> Success - * 0 -> Failure - */ -int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, - struct pim_upstream *up, struct rp_info *rp, - bool bsr_track_needed, - struct pim_nexthop_cache *out_pnc) +static struct pim_nexthop_cache *pim_nht_get(struct pim_instance *pim, + struct prefix *addr) { struct pim_nexthop_cache *pnc = NULL; struct pim_rpf rpf; - struct listnode *ch_node = NULL; struct zclient *zclient = NULL; zclient = pim_zebra_zclient_get(); @@ -145,6 +134,23 @@ int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, __func__, addr, pim->vrf->name); } + return pnc; +} + +/* TBD: this does several distinct things and should probably be split up. + * (checking state vs. returning pnc vs. adding upstream vs. adding rp) + */ +int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, + struct pim_upstream *up, struct rp_info *rp, + struct pim_nexthop_cache *out_pnc) +{ + struct pim_nexthop_cache *pnc; + struct listnode *ch_node = NULL; + + pnc = pim_nht_get(pim, addr); + + assertf(up || rp, "addr=%pFX", addr); + if (rp != NULL) { ch_node = listnode_lookup(pnc->rp_list, rp); if (ch_node == NULL) @@ -154,9 +160,6 @@ int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, if (up != NULL) hash_get(pnc->upstream_hash, up, hash_alloc_intern); - if (bsr_track_needed) - pnc->bsr_tracking = true; - if (CHECK_FLAG(pnc->flags, PIM_NEXTHOP_VALID)) { if (out_pnc) memcpy(out_pnc, pnc, sizeof(struct pim_nexthop_cache)); @@ -166,72 +169,146 @@ int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, return 0; } +void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr addr) +{ + struct pim_nexthop_cache *pnc; + struct prefix pfx; + + pfx.family = AF_INET; + pfx.prefixlen = IPV4_MAX_BITLEN; + pfx.u.prefix4 = addr; + + pnc = pim_nht_get(pim, &pfx); + + pnc->bsr_count++; +} + +static void pim_nht_drop_maybe(struct pim_instance *pim, + struct pim_nexthop_cache *pnc) +{ + if (PIM_DEBUG_PIM_NHT) + zlog_debug( + "%s: NHT %pFX(%s) rp_list count:%d upstream count:%ld BSR count:%u", + __func__, &pnc->rpf.rpf_addr, pim->vrf->name, + pnc->rp_list->count, pnc->upstream_hash->count, + pnc->bsr_count); + + if (pnc->rp_list->count == 0 && pnc->upstream_hash->count == 0 + && pnc->bsr_count == 0) { + struct zclient *zclient = pim_zebra_zclient_get(); + + pim_sendmsg_zebra_rnh(pim, zclient, pnc, + ZEBRA_NEXTHOP_UNREGISTER); + + list_delete(&pnc->rp_list); + hash_free(pnc->upstream_hash); + + hash_release(pim->rpf_hash, pnc); + if (pnc->nexthop) + nexthops_free(pnc->nexthop); + XFREE(MTYPE_PIM_NEXTHOP_CACHE, pnc); + } +} + void pim_delete_tracked_nexthop(struct pim_instance *pim, struct prefix *addr, - struct pim_upstream *up, struct rp_info *rp, - bool del_bsr_tracking) + struct pim_upstream *up, struct rp_info *rp) { struct pim_nexthop_cache *pnc = NULL; struct pim_nexthop_cache lookup; - struct zclient *zclient = NULL; struct pim_upstream *upstream = NULL; - zclient = pim_zebra_zclient_get(); - /* Remove from RPF hash if it is the last entry */ lookup.rpf.rpf_addr = *addr; pnc = hash_lookup(pim->rpf_hash, &lookup); - if (pnc) { - if (rp) { - /* Release the (*, G)upstream from pnc->upstream_hash, - * whose Group belongs to the RP getting deleted - */ - frr_each (rb_pim_upstream, &pim->upstream_head, - upstream) { - struct prefix grp; - struct rp_info *trp_info; - - if (upstream->sg.src.s_addr != INADDR_ANY) - continue; - - grp.family = AF_INET; - grp.prefixlen = IPV4_MAX_BITLEN; - grp.u.prefix4 = upstream->sg.grp; - - trp_info = pim_rp_find_match_group(pim, &grp); - if (trp_info == rp) - hash_release(pnc->upstream_hash, - upstream); - } - listnode_delete(pnc->rp_list, rp); + if (!pnc) { + zlog_warn("attempting to delete nonexistent NHT entry %pFX", + addr); + return; + } + + if (rp) { + /* Release the (*, G)upstream from pnc->upstream_hash, + * whose Group belongs to the RP getting deleted + */ + frr_each (rb_pim_upstream, &pim->upstream_head, upstream) { + struct prefix grp; + struct rp_info *trp_info; + + if (upstream->sg.src.s_addr != INADDR_ANY) + continue; + + grp.family = AF_INET; + grp.prefixlen = IPV4_MAX_BITLEN; + grp.u.prefix4 = upstream->sg.grp; + + trp_info = pim_rp_find_match_group(pim, &grp); + if (trp_info == rp) + hash_release(pnc->upstream_hash, upstream); } + listnode_delete(pnc->rp_list, rp); + } - if (up) - hash_release(pnc->upstream_hash, up); + if (up) + hash_release(pnc->upstream_hash, up); - if (del_bsr_tracking) - pnc->bsr_tracking = false; + pim_nht_drop_maybe(pim, pnc); +} - if (PIM_DEBUG_PIM_NHT) - zlog_debug( - "%s: NHT %pFX(%s) rp_list count:%d upstream count:%ld", - __func__, addr, pim->vrf->name, - pnc->rp_list->count, pnc->upstream_hash->count); - - if (pnc->rp_list->count == 0 - && pnc->upstream_hash->count == 0 - && pnc->bsr_tracking == false) { - pim_sendmsg_zebra_rnh(pim, zclient, pnc, - ZEBRA_NEXTHOP_UNREGISTER); - - list_delete(&pnc->rp_list); - hash_free(pnc->upstream_hash); - - hash_release(pim->rpf_hash, pnc); - if (pnc->nexthop) - nexthops_free(pnc->nexthop); - XFREE(MTYPE_PIM_NEXTHOP_CACHE, pnc); +void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr) +{ + struct pim_nexthop_cache *pnc = NULL; + struct pim_nexthop_cache lookup; + + lookup.rpf.rpf_addr.family = AF_INET; + lookup.rpf.rpf_addr.prefixlen = IPV4_MAX_BITLEN; + lookup.rpf.rpf_addr.u.prefix4 = addr; + + pnc = hash_lookup(pim->rpf_hash, &lookup); + + if (!pnc) { + zlog_warn("attempting to delete nonexistent NHT BSR entry %pI4", + &addr); + return; + } + + assertf(pnc->bsr_count > 0, "addr=%pI4", &addr); + pnc->bsr_count--; + + pim_nht_drop_maybe(pim, pnc); +} + +bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr, + struct interface *src_ifp, struct in_addr src_ip) +{ + struct pim_nexthop_cache *pnc = NULL; + struct pim_nexthop_cache lookup; + struct nexthop *nh; + + lookup.rpf.rpf_addr.family = AF_INET; + lookup.rpf.rpf_addr.prefixlen = IPV4_MAX_BITLEN; + lookup.rpf.rpf_addr.u.prefix4 = bsr_addr; + + pnc = hash_lookup(pim->rpf_hash, &lookup); + if (!pnc) + return false; + if (!CHECK_FLAG(pnc->flags, PIM_NEXTHOP_VALID)) + return false; + + /* if we accept BSMs from more than one ECMP nexthop, this will cause + * BSM message "multiplication" for each ECMP hop. i.e. if you have + * 4-way ECMP and 4 hops you end up with 256 copies of each BSM + * message. + * + * so... only accept the first (IPv4) nexthop as source. + */ + + for (nh = pnc->nexthop; nh; nh = nh->next) { + if (nh->type == NEXTHOP_TYPE_IPV4_IFINDEX) { + return nh->ifindex == src_ifp->ifindex + && nh->gate.ipv4.s_addr == src_ip.s_addr; } } + return false; } /* Given a source address and a neighbor address, check if the neighbor is one diff --git a/pimd/pim_nht.h b/pimd/pim_nht.h index 12dbf167d..e7d682540 100644 --- a/pimd/pim_nht.h +++ b/pimd/pim_nht.h @@ -45,22 +45,20 @@ struct pim_nexthop_cache { struct list *rp_list; struct hash *upstream_hash; - /* Ideally this has to be list of scope zone. But for now we can just - * have as a bool variable to say bsr_tracking. - * Later this variable can be changed as a list of scope zones for - * tracking same bsr for multiple scope zones. + + /* bsr_count won't currently go above 1 as we only have global_scope, + * but if anyone adds scope support multiple scopes may NHT-track the + * same BSR */ - bool bsr_tracking; + uint32_t bsr_count; }; int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS); int pim_find_or_track_nexthop(struct pim_instance *pim, struct prefix *addr, struct pim_upstream *up, struct rp_info *rp, - bool bsr_track_needed, struct pim_nexthop_cache *out_pnc); void pim_delete_tracked_nexthop(struct pim_instance *pim, struct prefix *addr, - struct pim_upstream *up, struct rp_info *rp, - bool del_bsr_tracking); + struct pim_upstream *up, struct rp_info *rp); struct pim_nexthop_cache *pim_nexthop_cache_find(struct pim_instance *pim, struct pim_rpf *rpf); uint32_t pim_compute_ecmp_hash(struct prefix *src, struct prefix *grp); @@ -77,4 +75,11 @@ bool pim_nexthop_match(struct pim_instance *pim, struct in_addr addr, bool pim_nexthop_match_nht_cache(struct pim_instance *pim, struct in_addr addr, struct in_addr ip_src); +/* for RPF check on BSM message receipt */ +void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr bsr_addr); +void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr bsr_addr); +/* RPF(bsr_addr) == src_ip%src_ifp? */ +bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr, + struct interface *src_ifp, struct in_addr src_ip); + #endif diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 165138738..7ad95d9f6 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -392,7 +392,7 @@ void pim_upstream_update(struct pim_instance *pim, struct pim_upstream *up) zlog_debug( "%s: Deregister upstream %s addr %pFX with Zebra NHT", __func__, up->sg_str, &nht_p); - pim_delete_tracked_nexthop(pim, &nht_p, up, NULL, false); + pim_delete_tracked_nexthop(pim, &nht_p, up, NULL); } /* Update the upstream address */ @@ -555,7 +555,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr, pim_rp_check_interfaces(pim, rp_all); pim_rp_refresh_group_to_rp_mapping(pim); pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_all, - false, NULL); + NULL); if (!pim_ecmp_nexthop_lookup(pim, &rp_all->rp.source_nexthop, @@ -649,7 +649,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr, if (PIM_DEBUG_PIM_NHT_RP) zlog_debug("%s: NHT Register RP addr %pFX grp %pFX with Zebra ", __func__, &nht_p, &rp_info->group); - pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, NULL); + pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, NULL); if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p, &rp_info->group, 1)) return PIM_RP_NO_PATH; @@ -757,7 +757,7 @@ int pim_rp_del(struct pim_instance *pim, struct in_addr rp_addr, if (PIM_DEBUG_PIM_NHT_RP) zlog_debug("%s: Deregister RP addr %pFX with Zebra ", __func__, &nht_p); - pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false); + pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info); if (!str2prefix("224.0.0.0/4", &g_all)) return PIM_RP_BAD_ADDRESS; @@ -886,7 +886,7 @@ int pim_rp_change(struct pim_instance *pim, struct in_addr new_rp_addr, if (PIM_DEBUG_PIM_NHT_RP) zlog_debug("%s: Deregister RP addr %pFX with Zebra ", __func__, &nht_p); - pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false); + pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info); } pim_rp_nexthop_del(rp_info); @@ -919,7 +919,7 @@ int pim_rp_change(struct pim_instance *pim, struct in_addr new_rp_addr, zlog_debug("%s: NHT Register RP addr %pFX grp %pFX with Zebra ", __func__, &nht_p, &rp_info->group); - pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, NULL); + pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, NULL); if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p, &rp_info->group, 1)) { route_unlock_node(rn); @@ -949,8 +949,7 @@ void pim_rp_setup(struct pim_instance *pim) nht_p.prefixlen = IPV4_MAX_BITLEN; nht_p.u.prefix4 = rp_info->rp.rpf_addr.u.prefix4; - pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, - NULL); + pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, NULL); if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p, &rp_info->group, 1)) if (PIM_DEBUG_PIM_NHT_RP) @@ -1097,8 +1096,7 @@ struct pim_rpf *pim_rp_g(struct pim_instance *pim, struct in_addr group) zlog_debug( "%s: NHT Register RP addr %pFX grp %pFX with Zebra", __func__, &nht_p, &rp_info->group); - pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, - NULL); + pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, NULL); pim_rpf_set_refresh_time(pim); (void)pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p, &rp_info->group, 1); @@ -1328,7 +1326,7 @@ void pim_resolve_rp_nh(struct pim_instance *pim, struct pim_neighbor *nbr) nht_p.u.prefix4 = rp_info->rp.rpf_addr.u.prefix4; memset(&pnc, 0, sizeof(struct pim_nexthop_cache)); if (!pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, - false, &pnc)) + &pnc)) continue; for (nh_node = pnc.nexthop; nh_node; nh_node = nh_node->next) { diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c index b93f85e48..aa89431d3 100644 --- a/pimd/pim_rpf.c +++ b/pimd/pim_rpf.c @@ -262,7 +262,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim, if ((up->sg.src.s_addr == INADDR_ANY && I_am_RP(pim, up->sg.grp)) || PIM_UPSTREAM_FLAG_TEST_FHR(up->flags)) neigh_needed = false; - pim_find_or_track_nexthop(pim, &nht_p, up, NULL, false, NULL); + pim_find_or_track_nexthop(pim, &nht_p, up, NULL, NULL); if (!pim_ecmp_nexthop_lookup(pim, &rpf->source_nexthop, &src, &grp, neigh_needed)) { /* Route is Deleted in Zebra, reset the stored NH data */ diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index d0d120523..6f22937de 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -271,7 +271,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim, zlog_debug( "%s: Deregister upstream %s addr %pFX with Zebra NHT", __func__, up->sg_str, &nht_p); - pim_delete_tracked_nexthop(pim, &nht_p, up, NULL, false); + pim_delete_tracked_nexthop(pim, &nht_p, up, NULL); } XFREE(MTYPE_PIM_UPSTREAM, up); diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c index 5d5ea1bfe..e24f64792 100644 --- a/pimd/pim_vxlan.c +++ b/pimd/pim_vxlan.c @@ -357,8 +357,8 @@ static void pim_vxlan_orig_mr_up_add(struct pim_vxlan_sg *vxlan_sg) nht_p.family = AF_INET; nht_p.prefixlen = IPV4_MAX_BITLEN; nht_p.u.prefix4 = up->upstream_addr; - pim_delete_tracked_nexthop(vxlan_sg->pim, - &nht_p, up, NULL, false); + pim_delete_tracked_nexthop(vxlan_sg->pim, &nht_p, up, + NULL); } /* We are acting FHR; clear out use_rpt setting if any */ pim_upstream_update_use_rpt(up, false /*update_mroute*/); |