diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-06-27 08:32:07 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-06-27 08:32:07 +0200 |
commit | edf6d1917c0422e44e0383dc0e0da55b484c86fa (patch) | |
tree | 8a95d878581d95d7cf4d982d365a20d512a5e1ef /bgpd/bgp_zebra.c | |
parent | bgpd: Use zlog_err when can't connect to table manager (zebra) (diff) | |
download | frr-edf6d1917c0422e44e0383dc0e0da55b484c86fa.tar.xz frr-edf6d1917c0422e44e0383dc0e0da55b484c86fa.zip |
bgpd: Guard zlog_debug for table manager when the connection is successful
We shouldn't use unguarded zlog_debug().
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r-- | bgpd/bgp_zebra.c | 7 |
1 files changed, 5 insertions, 2 deletions
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, |