diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-04 14:11:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-04 14:11:04 -0500 |
| commit | e302caaa818a2e582a98f16eaa807bc3928bf617 (patch) | |
| tree | cb6561db9a055c41f910e764f8178cf31637d3ad /zebra/zebra_vty.c | |
| parent | 86637de7f9e93ae64e7be226a5e69e80fb0e2ae4 (diff) | |
| parent | 0eb97b860dc94329cf9add9f8f3d3a2c7f539568 (diff) | |
Merge pull request #5416 from mjstapp/re_nhe_pointer
lib,zebra: use shared nexthop-group in route_entry
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 8a7c7e359f..eca86d5fe2 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -263,7 +263,7 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn, if (show_ng) vty_out(vty, " Nexthop Group ID: %u\n", re->nhe_id); - for (ALL_NEXTHOPS_PTR(re->ng, nexthop)) { + for (ALL_NEXTHOPS_PTR(re->nhe->nhg, nexthop)) { char addrstr[32]; vty_out(vty, " %c%s", @@ -413,7 +413,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, if (is_fib) nhg = rib_active_nhg(re); else - nhg = re->ng; + nhg = re->nhe->nhg; if (json) { json_route = json_object_new_object(); @@ -466,9 +466,10 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, json_object_int_add(json_route, "internalFlags", re->flags); json_object_int_add(json_route, "internalNextHopNum", - nexthop_group_nexthop_num(re->ng)); + nexthop_group_nexthop_num(re->nhe->nhg)); json_object_int_add(json_route, "internalNextHopActiveNum", - nexthop_group_active_nexthop_num(re->ng)); + nexthop_group_active_nexthop_num( + re->nhe->nhg)); if (uptime < ONE_DAY_SECOND) sprintf(buf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); @@ -1833,7 +1834,7 @@ static void vty_show_ip_route_summary_prefix(struct vty *vty, fib_cnt[ZEBRA_ROUTE_TOTAL]++; fib_cnt[re->type]++; } - for (nexthop = re->ng->nexthop; (!cnt && nexthop); + for (nexthop = re->nhe->nhg->nexthop; (!cnt && nexthop); nexthop = nexthop->next) { cnt++; rib_cnt[ZEBRA_ROUTE_TOTAL]++; |
