mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 18:04:03 +00:00
pim6d: Handle mrib_nexthop_addr zclient_lookup_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
This commit is contained in:
parent
265dec6ab8
commit
eed4433df4
@ -392,7 +392,7 @@ int zclient_lookup_nexthop(struct pim_instance *pim,
|
|||||||
for (lookup = 0; lookup < max_lookup; ++lookup) {
|
for (lookup = 0; lookup < max_lookup; ++lookup) {
|
||||||
int num_ifindex;
|
int num_ifindex;
|
||||||
int first_ifindex;
|
int first_ifindex;
|
||||||
struct prefix nexthop_addr;
|
pim_addr nexthop_addr;
|
||||||
|
|
||||||
num_ifindex = zclient_lookup_nexthop_once(pim, nexthop_tab,
|
num_ifindex = zclient_lookup_nexthop_once(pim, nexthop_tab,
|
||||||
tab_size, addr);
|
tab_size, addr);
|
||||||
@ -441,8 +441,7 @@ int zclient_lookup_nexthop(struct pim_instance *pim,
|
|||||||
nexthop_tab[0].route_metric);
|
nexthop_tab[0].route_metric);
|
||||||
|
|
||||||
/* use last address as nexthop address */
|
/* 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 */
|
/* report original route metric/distance */
|
||||||
nexthop_tab[0].route_metric = route_metric;
|
nexthop_tab[0].route_metric = route_metric;
|
||||||
@ -453,23 +452,16 @@ int zclient_lookup_nexthop(struct pim_instance *pim,
|
|||||||
return num_ifindex;
|
return num_ifindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PIM_DEBUG_PIM_NHT) {
|
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));
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: lookup=%d/%d: zebra returned recursive nexthop %s for address %pPA(%s) dist=%d met=%d",
|
"%s: lookup=%d/%d: zebra returned recursive nexthop %pPAs for address %pPA(%s) dist=%d met=%d",
|
||||||
__func__, lookup, max_lookup, nexthop_str,
|
__func__, lookup, max_lookup, &nexthop_addr,
|
||||||
&addr, pim->vrf->name,
|
&addr, pim->vrf->name,
|
||||||
nexthop_tab[0].protocol_distance,
|
nexthop_tab[0].protocol_distance,
|
||||||
nexthop_tab[0].route_metric);
|
nexthop_tab[0].route_metric);
|
||||||
}
|
|
||||||
|
|
||||||
addr = pim_addr_from_prefix(&(nexthop_addr)); /* use nexthop
|
addr = nexthop_addr; /* use nexthop
|
||||||
addr for recursive lookup */
|
addr for recursive lookup */
|
||||||
|
|
||||||
} /* for (max_lookup) */
|
} /* for (max_lookup) */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user