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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2015-11-09 06:51:45 -08:00
parent 301d65c0ba
commit a81bede2d5

View File

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