]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Remove flog_warn for a situation user can never do anything with 4934/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 5 Sep 2019 16:30:26 +0000 (12:30 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 5 Sep 2019 16:30:26 +0000 (12:30 -0400)
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 <sharpd@cumulusnetworks.com>
ospfd/ospf_packet.c

index 5a29c1fb07abb2c511875e581d74ffe015308a17..a508ae657fd9bb5830d32eda9b6ccc5640c75848 100644 (file)
@@ -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);