summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-04-29 12:22:14 +0100
committerPat Ruddy <pat@voltanet.io>2020-04-29 12:29:09 +0100
commit1cc5b09394677251f0f0c46703bf6095e231b5b0 (patch)
tree68939e84ee2e625ab768208bf403ee72f93f5a4a
parentf6be73082788c4be246b9b71f50237bbad40bfc8 (diff)
zebra: fix json for show evpn arp-cache vni vtep
The function zebra_vxlan_print_neigh_vni_vtep does not create a json object when json has been requested from the CLI and as a result it prints out the information in normal CLI format. Fix is to allocate the json object when required. Signed-off-by: Pat Ruddy <pat@voltanet.io>
-rw-r--r--zebra/zebra_vxlan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index b9e7251117..d85f48e570 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -6523,6 +6523,9 @@ void zebra_vxlan_print_neigh_vni_vtep(struct vty *vty, struct zebra_vrf *zvrf,
if (!num_neigh)
return;
+ if (use_json)
+ json = json_object_new_object();
+
memset(&wctx, 0, sizeof(struct neigh_walk_ctx));
wctx.zvni = zvni;
wctx.vty = vty;