diff options
author | sarita patra <saritap@vmware.com> | 2022-04-07 07:53:02 +0200 |
---|---|---|
committer | sarita patra <saritap@vmware.com> | 2022-04-07 07:56:31 +0200 |
commit | eed4433df448148feec30c4b74877199f76c1b95 (patch) | |
tree | ad8d2e8f9f5b6552a54ff4c24541e6045f1eeefc /pimd/pim_zlookup.c | |
parent | pim6d: Adjust IPV6 zclient_lookup_read_pipe (diff) | |
download | frr-eed4433df448148feec30c4b74877199f76c1b95.tar.xz frr-eed4433df448148feec30c4b74877199f76c1b95.zip |
pim6d: Handle mrib_nexthop_addr zclient_lookup_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_zlookup.c')
-rw-r--r-- | pimd/pim_zlookup.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 0cd82a55f..c3f0b4443 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -392,7 +392,7 @@ int zclient_lookup_nexthop(struct pim_instance *pim, for (lookup = 0; lookup < max_lookup; ++lookup) { int num_ifindex; int first_ifindex; - struct prefix nexthop_addr; + pim_addr nexthop_addr; num_ifindex = zclient_lookup_nexthop_once(pim, nexthop_tab, tab_size, addr); @@ -441,8 +441,7 @@ int zclient_lookup_nexthop(struct pim_instance *pim, nexthop_tab[0].route_metric); /* use last address as nexthop address */ - pim_addr_to_prefix( - &(nexthop_tab[0].nexthop_addr), addr); + nexthop_tab[0].nexthop_addr = addr; /* report original route metric/distance */ nexthop_tab[0].route_metric = route_metric; @@ -453,23 +452,16 @@ int zclient_lookup_nexthop(struct pim_instance *pim, return num_ifindex; } - if (PIM_DEBUG_PIM_NHT) { - char addr_str[INET_ADDRSTRLEN]; - char nexthop_str[PREFIX_STRLEN]; - pim_inet4_dump("<addr?>", addr, addr_str, - sizeof(addr_str)); - pim_addr_dump("<nexthop?>", &nexthop_addr, nexthop_str, - sizeof(nexthop_str)); + if (PIM_DEBUG_PIM_NHT) zlog_debug( - "%s: lookup=%d/%d: zebra returned recursive nexthop %s for address %pPA(%s) dist=%d met=%d", - __func__, lookup, max_lookup, nexthop_str, + "%s: lookup=%d/%d: zebra returned recursive nexthop %pPAs for address %pPA(%s) dist=%d met=%d", + __func__, lookup, max_lookup, &nexthop_addr, &addr, pim->vrf->name, nexthop_tab[0].protocol_distance, nexthop_tab[0].route_metric); - } - addr = pim_addr_from_prefix(&(nexthop_addr)); /* use nexthop - addr for recursive lookup */ + addr = nexthop_addr; /* use nexthop + addr for recursive lookup */ } /* for (max_lookup) */ |