While reading linux kernel netlink messages, rib->nexthop_num is incremented in the read loop as well as the underlying nexthop_add() function call. This number should only be incremented in one spot. Removing the increment from the read loop and allowing the underlying code to track this data as it is already.
Signed-off-by: Donald Sharp <[email protected]> --- zebra/rt_netlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 33fbc08..cbcbe7c 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -765,7 +765,6 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h, if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len) break; - rib->nexthop_num++; index = rtnh->rtnh_ifindex; gate = 0; if (rtnh->rtnh_len > sizeof (*rtnh)) @@ -968,7 +967,6 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h, if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len) break; - rib->nexthop_num++; index = rtnh->rtnh_ifindex; gate = 0; if (rtnh->rtnh_len > sizeof (*rtnh)) -- 1.7.10.4 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
