]> 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 14:24:55 +0000 (16:24 +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 40d38c44d272d1a89a47b61974ce5e77d5c081f8..f91fcb532f180b3be0abca941f793d1fd4d1b531 100644 (file)
@@ -826,7 +826,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");
        }