diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-15 11:16:22 -0500 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:36 -0400 |
| commit | eecacedc3b9526b59ef690bce41f41158a137c9f (patch) | |
| tree | 0655771318223c8800ee7ccf851da909cf2641af /zebra/zebra_rib.c | |
| parent | 6b46851168ef37eaacba28a2a655e15ae5934cd0 (diff) | |
zebra: Remove re->nexthop_num from re
The nexthop_num is not a function of the re. It is owned
by the nexthop group.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index c8ba3f9e9d..c56c953618 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -197,7 +197,6 @@ int zebra_check_addr(const struct prefix *p) void route_entry_nexthop_add(struct route_entry *re, struct nexthop *nexthop) { _nexthop_group_add_sorted(re->ng, nexthop); - re->nexthop_num++; } @@ -208,8 +207,6 @@ void route_entry_copy_nexthops(struct route_entry *re, struct nexthop *nh) { assert(!re->ng->nexthop); copy_nexthops(&re->ng->nexthop, nh, NULL); - for (struct nexthop *nexthop = nh; nexthop; nexthop = nexthop->next) - re->nexthop_num++; } /* Delete specified nexthop from the list. */ @@ -221,7 +218,6 @@ void route_entry_nexthop_delete(struct route_entry *re, struct nexthop *nexthop) nexthop->prev->next = nexthop->next; else re->ng->nexthop = nexthop->next; - re->nexthop_num--; } @@ -2485,7 +2481,7 @@ void _route_entry_dump(const char *func, union prefixconstptr pp, "%s: metric == %u, mtu == %u, distance == %u, flags == %u, status == %u", straddr, re->metric, re->mtu, re->distance, re->flags, re->status); zlog_debug("%s: nexthop_num == %u, nexthop_active_num == %u", straddr, - re->nexthop_num, re->nexthop_active_num); + nexthop_group_nexthop_num(re->ng), re->nexthop_active_num); for (ALL_NEXTHOPS_PTR(re->ng, nexthop)) { struct interface *ifp; @@ -2959,7 +2955,6 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, re->mtu = mtu; re->table = table_id; re->vrf_id = vrf_id; - re->nexthop_num = 0; re->uptime = monotime(NULL); re->tag = tag; re->ng = nexthop_group_new(); |
