From 729d630bee127a2e49c04e2315ae95ec1ffda65a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 28 Mar 2024 12:25:05 -0400 Subject: [PATCH] bgpd: Note when receiving but not understanding a route notification When BGP has been asked to wait for FIB installation, on route removal a return call is likely to not have the dest since BGP will have cleaned up the node, entirely. Let's just note that the prefix cannot be found if debugs are turned on and move on. Signed-off-by: Donald Sharp (cherry picked from commit 7c603146529dc90f2d948e1943750efb1911c8ba) --- bgpd/bgp_zebra.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 18162a7ae0..34198c96e1 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -2619,8 +2619,12 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, /* Find the bgp route node */ dest = bgp_safi_node_lookup(bgp->rib[afi][safi], safi, &p, &bgp->vrf_prd); - if (!dest) + if (!dest) { + if (BGP_DEBUG(zebra, ZEBRA)) + zlog_debug("%s: %pFX does not exist in the BGP table, nothing to do for %u", + __func__, &p, note); return -1; + } switch (note) { case ZAPI_ROUTE_INSTALLED: -- 2.39.5