]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix blank line in running-config with bmp listener cmd
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 28 Oct 2024 15:04:45 +0000 (16:04 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 29 Oct 2024 08:59:30 +0000 (08:59 +0000)
An extra blank line is added in show running-config with BMP:

> ubuntu2204hwe(config)# router bgp 65500
> ubuntu2204hwe(config-router)# bmp targets tgt
> ubuntu2204hwe(config-bgp-bmp)# bmp monitor ipv4 unicast pre-policy
> ubuntu2204hwe(config-bgp-bmp)# bmp listener 192.0.2.100 port 44
> ubuntu2204hwe(config-bgp-bmp)# do show running-config
>
> router bgp 65500
> [..]
>  bmp targets tgt
>   bmp monitor ipv4 unicast pre-policy
>                                       <-- blank line
>   bmp listener 192.0.2.100 port 44
>  exit

Remove the blank line.

Fixes: ed18356f1f2d ("bgpd/bmp: BMP implementation")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 9a33ee18bfe2769e173911d69cee64b78143184b)

bgpd/bgp_bmp.c

index baf164679c725586c871eaaa0c7df7e46d2e4037..5a65469dd76fdb18684ce0f42862efa9c2e1f638 100644 (file)
@@ -2507,8 +2507,7 @@ static int bmp_config_write(struct bgp *bgp, struct vty *vty)
                                        afi2str_lower(afi), safi2str(safi));
                }
                frr_each (bmp_listeners, &bt->listeners, bl)
-                       vty_out(vty, " \n  bmp listener %pSU port %d\n",
-                               &bl->addr, bl->port);
+                       vty_out(vty, "   bmp listener %pSU port %d\n", &bl->addr, bl->port);
 
                frr_each (bmp_actives, &bt->actives, ba) {
                        vty_out(vty, "  bmp connect %s port %u min-retry %u max-retry %u",