From: Carmine Scarpitta Date: Fri, 10 Nov 2023 21:31:09 +0000 (+0100) Subject: bgpd: Add guard for `zlog_debug` X-Git-Tag: base_10.0~292^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F14766%2Fhead;p=mirror%2Ffrr.git bgpd: Add guard for `zlog_debug` Add guard for `zlog_debug` when bgpd is not connected to zebra or zebra does not know the bgp instance. Signed-off-by: Carmine Scarpitta --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 65ac92ef05..1e8f7415b0 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -73,9 +73,10 @@ static inline bool bgp_install_info_to_zebra(struct bgp *bgp) return false; if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) { - zlog_debug( - "%s: No zebra instance to talk to, not installing information", - __func__); + if (BGP_DEBUG(zebra, ZEBRA)) + zlog_debug( + "%s: No zebra instance to talk to, not installing information", + __func__); return false; }