Skip to content

Commit

Permalink
bgpd: Add guard for zlog_debug
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cscarpitta committed Nov 10, 2023
1 parent 19bcca4 commit 64632d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 64632d2

Please sign in to comment.