summaryrefslogtreecommitdiff
path: root/zebra/zebra_rnh.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 303a81bb3e..89317be74d 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -1344,13 +1344,17 @@ static void print_rnh(struct route_node *rn, struct vty *vty, json_object *json)
}
if (rnh->state) {
- if (json)
+ if (json) {
json_object_string_add(
json_nht, "resolvedProtocol",
zebra_route_string(rnh->state->type));
- else
- vty_out(vty, " resolved via %s\n",
- zebra_route_string(rnh->state->type));
+ json_object_string_addf(json_nht, "prefix", "%pFX",
+ &rnh->resolved_route);
+ } else {
+ vty_out(vty, " resolved via %s, prefix %pFX\n",
+ zebra_route_string(rnh->state->type),
+ &rnh->resolved_route);
+ }
for (nexthop = rnh->state->nhe->nhg.nexthop; nexthop;
nexthop = nexthop->next) {