summaryrefslogtreecommitdiff
path: root/nhrpd
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2024-08-30 17:53:31 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2024-10-17 11:24:50 +0200
commite2db455c0144f2732e0dd681942f2c489e4b5d85 (patch)
tree1d5a0925a2e7a7b9ec7ac77e1ae3fa50dd971da9 /nhrpd
parent65d62d982eae072bf02fc80fe4c0a67c91af3c88 (diff)
nhrpd: normalize sh ip nhrp opennhrp output
The command outputs too much "\n". Normalize it. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/nhrp_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c
index 0fc3dee98d..5db1327b02 100644
--- a/nhrpd/nhrp_vty.c
+++ b/nhrpd/nhrp_vty.c
@@ -934,6 +934,8 @@ static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)
if (ctx->afi != family2afi(sockunion_family(&c->remote_addr)))
return;
+ if (ctx->count && !ctx->json)
+ vty_out(ctx->vty, "\n");
ctx->count++;
sockunion2str(&c->remote_addr, buf[0], sizeof(buf[0]));
@@ -988,8 +990,6 @@ static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)
if (sockunion_family(&c->cur.remote_nbma_natoa) != AF_UNSPEC)
vty_out(ctx->vty, "NBMA-NAT-OA-Address: %s\n", buf[2]);
-
- vty_out(ctx->vty, "\n\n");
}
DEFUN(show_ip_nhrp, show_ip_nhrp_cmd,