]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Guard zlog_debug for table manager when the connection is successful
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 27 Jun 2023 06:32:07 +0000 (09:32 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 27 Jun 2023 06:32:07 +0000 (09:32 +0300)
We shouldn't use unguarded zlog_debug().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_zebra.c

index e6d2a10a2a4a3b5f88debf34c8284e9fe1d3c23a..a34d1a03489a28eee5439d07756d6c4b68452ff5 100644 (file)
@@ -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,