]> git.proxmox.com Git - mirror_frr.git/commitdiff
nhrpd: Actually allow json output
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 Apr 2020 13:25:54 +0000 (09:25 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 Apr 2020 13:25:54 +0000 (09:25 -0400)
Add the correct pointer check to see if we should
be doing json output.

Discovered by SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
nhrpd/nhrp_vty.c

index a3066f917e3bebd4866c1a5a519e8e9f56e7a806..cc35f09aaee615beb1423e6cf828b3c74c64c6ea 100644 (file)
@@ -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",