From 09bdb655f7d6268e1db9ae2c940577ed927c1f66 Mon Sep 17 00:00:00 2001 From: vivek Date: Tue, 24 Mar 2020 14:40:09 -0700 Subject: [PATCH] zebra: Display next hop weight via JSON key Signed-off-by: Vivek Venkatraman --- zebra/zebra_vty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 590ec57087..ef341b18bc 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -765,6 +765,10 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, json_labels); } + if (nexthop->weight) + json_object_int_add(json_nexthop, "weight", + nexthop->weight); + json_object_array_add(json_nexthops, json_nexthop); }