]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Give better debug message when configuration is being read in
authorDonald Sharp <sharpd@nvidia.com>
Wed, 22 Feb 2023 16:38:00 +0000 (11:38 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 22 Feb 2023 20:30:47 +0000 (20:30 +0000)
Sometimes bgp connections can be rejected for a variety of reasons.  Give
a bit more context about what is going wrong so that the operator can
make better decisions about their network.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7c5062fb275c0530559004621f7cc7e2f5d926a4)

bgpd/bgp_network.c

index 7186a507110027de3dee3be75373ebce9279030d..dcf42ec43bb546e16042b93e99773aa2e6e78f39 100644 (file)
@@ -521,10 +521,16 @@ static void bgp_accept(struct thread *thread)
         * is shutdown.
         */
        if (BGP_PEER_START_SUPPRESSED(peer1)) {
-               if (bgp_debug_neighbor_events(peer1))
-                       zlog_debug(
-                               "[Event] Incoming BGP connection rejected from %s due to maximum-prefix or shutdown",
-                               peer1->host);
+               if (bgp_debug_neighbor_events(peer1)) {
+                       if (peer1->shut_during_cfg)
+                               zlog_debug(
+                                       "[Event] Incoming BGP connection rejected from %s due to configuration being currently read in",
+                                       peer1->host);
+                       else
+                               zlog_debug(
+                                       "[Event] Incoming BGP connection rejected from %s due to maximum-prefix or shutdown",
+                                       peer1->host);
+               }
                close(bgp_sock);
                return;
        }