summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-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 d2231c396..b90097a4f 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -7522,10 +7522,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");
}