diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-10 02:28:49 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-10 02:28:49 +0100 |
commit | 1e03ae0dc7e183dccca38e92ab079bd51ca83fc9 (patch) | |
tree | b3185baa0558f8a0a2b63a0544c2d8cbe7fdda88 /zebra | |
parent | Merge pull request #3889 from donaldsharp/rnh_vrf_down_stuff (diff) | |
download | frr-1e03ae0dc7e183dccca38e92ab079bd51ca83fc9.tar.xz frr-1e03ae0dc7e183dccca38e92ab079bd51ca83fc9.zip |
zebra: Allow json output to give a bit more data
The dest->selected_fib should be reported in json output
so that we can debug subtle conditions a bit better in the
future.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 537820f7e..b0884f22c 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -383,6 +383,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, json_object *json_labels = NULL; time_t uptime; struct tm *tm; + rib_dest_t *dest = rib_dest_from_rnode(rn); uptime = time(NULL); uptime -= re->uptime; @@ -407,6 +408,10 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED)) json_object_boolean_true_add(json_route, "selected"); + if (dest->selected_fib == re) + json_object_boolean_true_add(json_route, + "destSelected"); + json_object_int_add(json_route, "distance", re->distance); json_object_int_add(json_route, "metric", re->metric); |