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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-04-01 12:13:34 -04:00
parent aee1decce2
commit 377e4f99bb
2 changed files with 0 additions and 40 deletions

View File

@ -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("<nht_nbr?>", nbr->source_addr, str1,
sizeof(str1));
pim_addr_dump("<nht_addr?>", 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.*/ /* Update Upstream nexthop info based on Nexthop update received from Zebra.*/
static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg) static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg)
{ {

View File

@ -65,7 +65,6 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim,
struct prefix *grp, int neighbor_needed); struct prefix *grp, int neighbor_needed);
void pim_sendmsg_zebra_rnh(struct pim_instance *pim, struct zclient *zclient, void pim_sendmsg_zebra_rnh(struct pim_instance *pim, struct zclient *zclient,
struct pim_nexthop_cache *pnc, int command); 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, int pim_ecmp_fib_lookup_if_vif_index(struct pim_instance *pim,
struct prefix *src, struct prefix *grp); struct prefix *src, struct prefix *grp);
void pim_rp_nexthop_del(struct rp_info *rp_info); void pim_rp_nexthop_del(struct rp_info *rp_info);