]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: protect "could not get instance" error message with debug
authorDon Slice <dslice@cumulusnetworks.com>
Tue, 11 Oct 2016 15:08:37 +0000 (11:08 -0400)
committerDon Slice <dslice@cumulusnetworks.com>
Tue, 11 Oct 2016 15:08:37 +0000 (11:08 -0400)
If bgp gets inbound connect messages on an interface associated with
a vrf, but the vrf is not defined yet in bgp, the log is filled with
continual error messages. This change moves that error message to a
debug under "debug bgp neighbor-events".  Manual testing results
applied to the ticket.

Ticket: CM-10394
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
bgpd/bgp_network.c

index 61972aabf1f145cb4afacacb6a3833c55dfc605f..e3c9c3494bc04f368440cc06bbc15e5571dcda9b 100644 (file)
@@ -313,8 +313,9 @@ bgp_accept (struct thread *thread)
   /* Obtain BGP instance this connection is meant for. */
   if (bgp_get_instance_for_inc_conn (bgp_sock, &bgp))
     {
-      zlog_err ("[Error] Could not get instance for incoming conn from %s",
-                inet_sutop (&su, buf));
+      if (bgp_debug_neighbor_events(NULL))
+        zlog_debug ("[Event] Could not get instance for incoming conn from %s",
+                    inet_sutop (&su, buf));
       close (bgp_sock);
       return -1;
     }