pim6d: Handling last_lookup in pim_nexthop for IPV6

Signed-off-by: sarita patra <saritap@vmware.com>
This commit is contained in:
sarita patra 2022-02-17 00:08:31 -08:00
parent ee95029ac4
commit 113f29b90d
2 changed files with 2 additions and 3 deletions

View File

@ -1030,8 +1030,7 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim,
nexthop_tab[i].protocol_distance;
nexthop->mrib_route_metric =
nexthop_tab[i].route_metric;
memcpy(&(nexthop->last_lookup), &(src_addr),
sizeof(pim_addr));
nexthop->last_lookup = src_addr;
nexthop->last_lookup_time = pim_time_monotonic_usec();
nexthop->nbr = nbr;
found = 1;

View File

@ -67,7 +67,7 @@ bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop,
* 255.255.255.255 address, since
* it will never work
*/
if (addr.s_addr == INADDR_NONE)
if (pim_addr_is_none(addr))
return false;
#endif