]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Added a few more information in route_entry while dumping
authorvdhingra <vdhingra@vmware.com>
Fri, 23 Aug 2019 05:36:36 +0000 (22:36 -0700)
committervdhingra <vdhingra@vmware.com>
Fri, 23 Aug 2019 13:02:53 +0000 (06:02 -0700)
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>
zebra/zebra_vty.c

index 5c0dc2738019f3a2754cb58455dd4bcf07714680..e6487b8334b1cc777b405c838e114507e31dd572 100644 (file)
@@ -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);