From edf6d1917c0422e44e0383dc0e0da55b484c86fa Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 27 Jun 2023 09:32:07 +0300 Subject: bgpd: Guard zlog_debug for table manager when the connection is successful We shouldn't use unguarded zlog_debug(). Signed-off-by: Donatas Abraitis --- bgpd/bgp_zebra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bgpd/bgp_zebra.c') diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index e6d2a10a2..a34d1a034 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1078,8 +1078,11 @@ static void bgp_zebra_tm_connect(struct event *t) zlog_err("Error connecting to table manager!"); bgp_tm_status_connected = false; } else { - if (!bgp_tm_status_connected) - zlog_debug("Connecting to table manager. Success"); + if (!bgp_tm_status_connected) { + if (BGP_DEBUG(zebra, ZEBRA)) + zlog_debug( + "Connecting to table manager. Success"); + } bgp_tm_status_connected = true; if (!bgp_tm_chunk_obtained) { if (bgp_zebra_get_table_range(bgp_tm_chunk_size, -- cgit v1.2.3