Skip to content

Commit

Permalink
nhrpd: normalize sh ip nhrp opennhrp output
Browse files Browse the repository at this point in the history
The command outputs too much "\n". Normalize it.

Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Oct 17, 2024
1 parent 65d62d9 commit e2db455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nhrpd/nhrp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e2db455

Please sign in to comment.