diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-09-14 13:29:37 -0400 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2015-09-24 15:26:45 +0100 |
commit | 782c882077b5a63213b3d160535d5e8259f6df61 (patch) | |
tree | 31a9ed3f8d228f41080e684557b48939943ee6a8 | |
parent | 8ccd74c29f5242f312c1e0561497558482c9be65 (diff) | |
download | quagga-782c882077b5a63213b3d160535d5e8259f6df61.tar.bz2 quagga-782c882077b5a63213b3d160535d5e8259f6df61.tar.xz |
zebra: rib->nexthop_num is double incremented
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 <sharpd@cumulusnetworks.com>
-rw-r--r-- | zebra/rt_netlink.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 33fbc080..cbcbe7c5 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)) |