From 377e4f99bbbd3d38ddd1429fb5aaef4322283ffd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 1 Apr 2019 12:13:34 -0400 Subject: [PATCH] pimd: Remove pim_resolve_upstream_nh The pim_resolve_upstream_nh function call is no longer being used let's remove it from the code base. Signed-off-by: Donald Sharp --- pimd/pim_nht.c | 39 --------------------------------------- pimd/pim_nht.h | 1 - 2 files changed, 40 deletions(-) diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 9b5379384c..5e550dfe85 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -264,45 +264,6 @@ static void pim_update_rp_nh(struct pim_instance *pim, } } -/* This API is used to traverse nexthop cache of RPF addr - of upstream entry whose IPv4 nexthop address is in - unresolved state and due to event like pim neighbor - UP event if it can be resolved. -*/ -void pim_resolve_upstream_nh(struct pim_instance *pim, struct prefix *nht_p) -{ - struct nexthop *nh_node = NULL; - struct pim_nexthop_cache pnc; - struct pim_neighbor *nbr = NULL; - - memset(&pnc, 0, sizeof(struct pim_nexthop_cache)); - if (!pim_find_or_track_nexthop(pim, nht_p, NULL, NULL, &pnc)) - return; - - for (nh_node = pnc.nexthop; nh_node; nh_node = nh_node->next) { - if (nh_node->gate.ipv4.s_addr != 0) - continue; - - struct interface *ifp1 = - if_lookup_by_index(nh_node->ifindex, pim->vrf_id); - nbr = pim_neighbor_find_if(ifp1); - if (!nbr) - continue; - - nh_node->gate.ipv4 = nbr->source_addr; - if (PIM_DEBUG_PIM_NHT) { - char str[PREFIX_STRLEN]; - char str1[INET_ADDRSTRLEN]; - pim_inet4_dump("", nbr->source_addr, str1, - sizeof(str1)); - pim_addr_dump("", nht_p, str, sizeof(str)); - zlog_debug( - "%s: addr %s new nexthop addr %s interface %s", - __PRETTY_FUNCTION__, str, str1, ifp1->name); - } - } -} - /* Update Upstream nexthop info based on Nexthop update received from Zebra.*/ static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg) { diff --git a/pimd/pim_nht.h b/pimd/pim_nht.h index 6eff7bbc89..e3e9f578c9 100644 --- a/pimd/pim_nht.h +++ b/pimd/pim_nht.h @@ -65,7 +65,6 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim, struct prefix *grp, int neighbor_needed); void pim_sendmsg_zebra_rnh(struct pim_instance *pim, struct zclient *zclient, struct pim_nexthop_cache *pnc, int command); -void pim_resolve_upstream_nh(struct pim_instance *pim, struct prefix *nht_p); int pim_ecmp_fib_lookup_if_vif_index(struct pim_instance *pim, struct prefix *src, struct prefix *grp); void pim_rp_nexthop_del(struct rp_info *rp_info); -- 2.39.5