if (PIM_DEBUG_ZEBRA) {
char nexthop_str[PREFIX_STRLEN];
char addr_str[INET_ADDRSTRLEN];
- pim_addr_dump("<nexthop?>", &nexthop_tab[0].nexthop_addr, nexthop_str, sizeof(nexthop_str));
+ pim_addr_dump("<nexthop?>", &nexthop_tab[i].nexthop_addr, nexthop_str, sizeof(nexthop_str));
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_debug("%s %s: found nexthop %s for address %s: interface %s ifindex=%d metric=%d pref=%d",
__FILE__, __PRETTY_FUNCTION__,
nexthop_str, addr_str,
ifp->name, first_ifindex,
- nexthop_tab[0].route_metric,
- nexthop_tab[0].protocol_distance);
+ nexthop_tab[i].route_metric,
+ nexthop_tab[i].protocol_distance);
}
/* update nextop data */
nexthop->interface = ifp;
- nexthop->mrib_nexthop_addr = nexthop_tab[0].nexthop_addr;
- nexthop->mrib_metric_preference = nexthop_tab[0].protocol_distance;
- nexthop->mrib_route_metric = nexthop_tab[0].route_metric;
+ nexthop->mrib_nexthop_addr = nexthop_tab[i].nexthop_addr;
+ nexthop->mrib_metric_preference = nexthop_tab[i].protocol_distance;
+ nexthop->mrib_route_metric = nexthop_tab[i].route_metric;
nexthop->last_lookup = addr;
nexthop->last_lookup_time = pim_time_monotonic_usec();
return 0;