diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2023-11-10 22:31:09 +0100 | 
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2023-11-10 22:33:18 +0100 | 
| commit | 64632d285c99f6fa1481737a581b878224c80883 (patch) | |
| tree | 8e10966b109ff9791341583d12a5d60d6bda3140 /bgpd/bgp_zebra.c | |
| parent | 19bcca4f2e9a3ee3c8cc16608dcf303241bbf014 (diff) | |
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 <cscarpit@cisco.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
| -rw-r--r-- | bgpd/bgp_zebra.c | 7 | 
1 files changed, 4 insertions, 3 deletions
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;  	}  | 
