From a81bede2d5c93c3108fbdcf2ea07aafb1001c06a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 9 Nov 2015 06:51:45 -0800 Subject: [PATCH] OSPF: Fix zlog_warn to zlog_debug in some unlikely scenarios 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 --- ospfd/ospf_packet.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 468810e8a3..8bf07783e1 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -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; } -- 2.39.5