]> git.puffer.fish Git - matthieu/frr.git/commitdiff
OSPF: Fix zlog_warn to zlog_debug in some unlikely scenarios
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 9 Nov 2015 14:51:45 +0000 (06:51 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 9 Nov 2015 14:51:45 +0000 (06:51 -0800)
When there is an OSPF missconfiguration, do not zlog_warn the fact
as that it would quickly overwhelm any log file.

Ticket: CM-7534
Reviewed by: CCR-3756
Testing: See bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_packet.c

index 468810e8a3b4ba1aa0713d2f937f22b3433d3e8f..8bf07783e14a86c0fdbf9d67e8616999f3831f49 100644 (file)
@@ -1765,10 +1765,11 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
   /* Check neighbor state. */
   if (nbr->state < NSM_Exchange)
     {
-      zlog_warn ("Link State Update: "
-                "Neighbor[%s] state %s is less than Exchange",
-                inet_ntoa (ospfh->router_id),
-                LOOKUP(ospf_nsm_state_msg, nbr->state));
+      if (IS_DEBUG_OSPF (nsm, NSM_EVENTS))
+       zlog_debug ("Link State Update: "
+                   "Neighbor[%s] state %s is less than Exchange",
+                   inet_ntoa (ospfh->router_id),
+                   LOOKUP(ospf_nsm_state_msg, nbr->state));
       return;
     }
 
@@ -2129,10 +2130,11 @@ ospf_ls_ack (struct ip *iph, struct ospf_header *ospfh,
 
   if (nbr->state < NSM_Exchange)
     {
-      zlog_warn ("Link State Acknowledgment: "
-                "Neighbor[%s] state %s is less than Exchange",
-                inet_ntoa (ospfh->router_id),
-                LOOKUP(ospf_nsm_state_msg, nbr->state));
+      if (IS_DEBUG_OSPF (nsm, NSM_EVENTS))
+       zlog_debug ("Link State Acknowledgment: "
+                   "Neighbor[%s] state %s is less than Exchange",
+                   inet_ntoa (ospfh->router_id),
+                   LOOKUP(ospf_nsm_state_msg, nbr->state));
       return;
     }