summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4de73f1244..db3bb2f63c 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -7504,10 +7504,9 @@ void route_vty_out_tmp(struct vty *vty, struct prefix *p, struct attr *attr,
json_object_object_add(json_net, "appliedStatusSymbols",
json_status);
char buf_cut[BUFSIZ];
- json_object_object_add(
- json_ar,
- inet_ntop(p->family, &p->u.prefix, buf_cut, BUFSIZ),
- json_net);
+
+ prefix2str(p, buf_cut, PREFIX_STRLEN);
+ json_object_object_add(json_ar, buf_cut, json_net);
} else
vty_out(vty, "\n");
}