Skip to content

Commit

Permalink
bgpd: fix 'show bgp neighbors' output
Browse files Browse the repository at this point in the history
The 'show bgp neighbors' output appends additional lines after GR mode
helpers.

> # show bgp neighbors
> [..]
>     End-of-RIB received: IPv4 VPN
>     Local GR Mode: Helper*
>
>     Remote GR Mode: Helper
>
>     R bit: True
>

Fix this by not appending the extra line feed.

> # show bgp neighbors
> [..]
>     End-of-RIB received: IPv4 VPN
>     Local GR Mode: Helper*
>     Remote GR Mode: Helper
>     R bit: True

Fixes: 0e4e879 ("bgpd: fix silly format string SNAFU")

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Apr 10, 2024
1 parent 5ff9474 commit 34738e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -12750,7 +12750,7 @@ static void bgp_show_neighbor_graceful_restart_remote_mode(struct vty *vty,
if (json)
json_object_string_add(json, "remoteGrMode", mode);
else
vty_out(vty, "%s\n", mode);
vty_out(vty, "%s", mode);
}

static void bgp_show_neighbor_graceful_restart_local_mode(struct vty *vty,
Expand Down Expand Up @@ -12782,7 +12782,7 @@ static void bgp_show_neighbor_graceful_restart_local_mode(struct vty *vty,
if (json)
json_object_string_add(json, "localGrMode", mode);
else
vty_out(vty, "%s\n", mode);
vty_out(vty, "%s", mode);
}

static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(
Expand Down

0 comments on commit 34738e3

Please sign in to comment.