]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix 'show bgp neighbors' output 15719/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 10 Apr 2024 12:13:54 +0000 (14:13 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 10 Apr 2024 12:15:06 +0000 (14:15 +0200)
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: 0e4e879b4084 ("bgpd: fix silly format string SNAFU")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_vty.c

index 0a1cf3362bf7d51bd3cc77bd5a79fd7027f6954a..bcd029dcad5bbde0abb89777813c9603e87410ae 100644 (file)
@@ -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,
@@ -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(