summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvdhingra <vdhingra@vmware.com>2019-08-22 22:36:36 -0700
committervdhingra <vdhingra@vmware.com>2019-08-23 06:02:53 -0700
commitd4c7ac01058ce0a3251477aeb9c110fdb883907d (patch)
treef5cff15291b5dd31c1d186573b2c92fea2bb7abf
parent401ba2adf907272111cbfe67e38d8b2ec9abc843 (diff)
zebra: Added a few more information in route_entry while dumping
re->nexthop_num and re->nexthop_active_num are calculated while rib processing. Also It helps in encoding the ZAPI message. It's good to dump these parameters also, when the system is in abnormal state. Signed-off-by: vishaldhingra<vdhingra@vmware.com>
-rw-r--r--zebra/zebra_vty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 5c0dc27380..e6487b8334 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -455,6 +455,10 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
re->status);
json_object_int_add(json_route, "internalFlags",
re->flags);
+ json_object_int_add(json_route, "internalNextHopNum",
+ re->nexthop_num);
+ json_object_int_add(json_route, "internalNextHopActiveNum",
+ re->nexthop_active_num);
if (uptime < ONE_DAY_SECOND)
sprintf(buf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min,
tm->tm_sec);