From b002757c266f76b8989dfddee835591a22115561 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 21 Jan 2025 15:34:13 +0100 Subject: [PATCH] bgpd: fix do not send twice peer up/down messages With recent BMP code, on a standard BMP config, the peer up and peer down messages related to a BGP peer are sent twice, whereas they should be send only once. Fix this by better controlling the condition. Fixes: f8a693311145 ("bgpd: bmp, handle imported bgp instances for peer up/down events") Signed-off-by: Philippe Guibert --- bgpd/bgp_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 21f9212556..e458e5e5ac 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2451,7 +2451,7 @@ static void bmp_send_all_bgp(struct peer *peer, bool down) if (!bmpbgp) continue; frr_each (bmp_targets, &bmpbgp->targets, bt) { - if (bgp_vrf != peer->bgp && !bmp_imported_bgp_find(bt, peer->bgp->name)) + if (bgp_vrf == peer->bgp || !bmp_imported_bgp_find(bt, peer->bgp->name)) continue; bmp_send_bt(bt, s); } -- 2.39.5