]> git.puffer.fish Git - matthieu/frr.git/commitdiff
nhrpd: fix show nhrp shortcut json
authorLouis Scalbert <louis.scalbert@6wind.com>
Fri, 30 Aug 2024 12:35:58 +0000 (14:35 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Fri, 30 Aug 2024 12:59:22 +0000 (14:59 +0200)
Fix show nhrp shortcut json

Fixes: 87b9e98203 ("nhrpd: add json support to show nhrp vty commands")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
nhrpd/nhrp_vty.c

index 22b6bdcec739064b72eaff79fe5bf6770a9e75df..96ba4728bf13e377b3e2495177371d057b466e8f 100644 (file)
@@ -882,7 +882,7 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)
        char buf1[PREFIX_STRLEN], buf2[SU_ADDRSTRLEN];
        struct json_object *json = NULL;
 
-       if (!ctx->count) {
+       if (!ctx->count && !ctx->json) {
                vty_out(vty, "%-8s %-24s %-24s %s\n", "Type", "Prefix", "Via",
                        "Identity");
        }