From 95ed7b1da32fadcfb8eb7efd00a39f9ea02e2bcf Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Fri, 30 Aug 2024 14:35:58 +0200 Subject: [PATCH] nhrpd: fix show nhrp shortcut json Fix show nhrp shortcut json Fixes: 87b9e98203 ("nhrpd: add json support to show nhrp vty commands") Signed-off-by: Louis Scalbert (cherry picked from commit 7028e399865bf1f21c286e2c11c3c90e9b0e3fe3) --- 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 40d38c44d2..f91fcb532f 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -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"); } -- 2.39.5