From e0a1fb2235436ebb360a43022addfb644105f8a4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 15 Apr 2020 09:25:54 -0400 Subject: [PATCH] nhrpd: Actually allow json output Add the correct pointer check to see if we should be doing json output. Discovered by SA. Signed-off-by: Donald Sharp --- nhrpd/nhrp_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index a3066f917e..cc35f09aae 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -622,7 +622,7 @@ static void show_ip_nhrp_cache(struct nhrp_cache *c, void *pctx) else snprintf(buf[1], sizeof(buf[1]), "-"); - if (json) { + if (ctx->json) { json = json_object_new_object(); json_object_string_add(json, "interface", c->ifp->name); json_object_string_add(json, "type", -- 2.39.5