diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-22 01:42:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-22 01:42:19 +0200 |
commit | 6d9ed6df1b9fe76359dd28e49278eda8c99d7d45 (patch) | |
tree | 909c5a58044fbb0774405359e5ba69e26d08952a | |
parent | Merge pull request #4536 from pguibert6WIND/bfd_startup_does_not_work (diff) | |
parent | bgpd : add prefix-length in show ip bgp neighbor advertised routes key (diff) | |
download | frr-6d9ed6df1b9fe76359dd28e49278eda8c99d7d45.tar.xz frr-6d9ed6df1b9fe76359dd28e49278eda8c99d7d45.zip |
Merge pull request #4331 from patrasar/bgp_cli_fix
bgpd : add prefix-length in show ip bgp neighbor advertised routes key
-rw-r--r-- | bgpd/bgp_route.c | 7 |
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"); } |