From: Donald Sharp Date: Thu, 5 Sep 2019 16:30:26 +0000 (-0400) Subject: ospfd: Remove flog_warn for a situation user can never do anything with X-Git-Tag: base_7.3~378^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=96db9cd3a1960301d4079a380748012e9d73422d;p=mirror%2Ffrr.git ospfd: Remove flog_warn for a situation user can never do anything with When OSPF receives a Database description packet and is in `Down`, `Attempt` or `2-Way` state we are creating a warning for the end user. rfc2328 states(10.6): Down - The packet should be rejected Attempt - The packet should be rejected 2-Way - The packet should be ignored I cannot find any instructions in the rfc to state what the operational difference is between rejected and ignored. Neither can I figure out what FRR expects the end user to do with this information. I can see this information being useful if we encounter a bug down the line and we have gathered a bunch of data. As such let's modify the code to remove the flog_warn and convert the message to a debug level message that can be controlled by appropriate debug statements. Signed-off-by: Donald Sharp --- diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 5a29c1fb07..a508ae657f 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1362,11 +1362,12 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh, case NSM_Down: case NSM_Attempt: case NSM_TwoWay: - flog_warn( - EC_OSPF_PACKET, - "Packet[DD]: Neighbor %s state is %s, packet discarded.", - inet_ntoa(nbr->router_id), - lookup_msg(ospf_nsm_state_msg, nbr->state, NULL)); + if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) + zlog_info( + "Packet[DD]: Neighbor %s state is %s, packet discarded.", + inet_ntoa(nbr->router_id), + lookup_msg(ospf_nsm_state_msg, nbr->state, + NULL)); break; case NSM_Init: OSPF_NSM_EVENT_EXECUTE(nbr, NSM_TwoWayReceived);