Merge pull request #2161 from donaldsharp/zebra_improved_out

zebra: Add a few more breadcrumbs
This commit is contained in:
Jafar Al-Gharaibeh 2018-05-03 09:41:12 -05:00 committed by GitHub
commit 83f5c52f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1215,6 +1215,10 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
json_object_int_add(json_route, "metric", re->metric);
}
json_object_int_add(json_route, "internalStatus",
re->status);
json_object_int_add(json_route, "internalFlags",
re->flags);
if (uptime < ONE_DAY_SECOND)
sprintf(buf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min,
tm->tm_sec);
@ -1231,6 +1235,9 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
for (ALL_NEXTHOPS(re->ng, nexthop)) {
json_nexthop = json_object_new_object();
json_object_int_add(json_nexthop, "flags",
nexthop->flags);
if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE))
json_object_boolean_true_add(json_nexthop,
"duplicate");