Browse Source

ospfd: Don't wait for state change to Exchange to start LSReq

ANVL test 17.5. The current implementation wouldn't start sending LSReq unti
the DB Desc packets have all been received (no M bit). This caused the test
choke up. RFC 2328 allows for sending LSReq on receiving the first DbDesc
packet as long as the nbr state is Exchange. This patch fixes that.

Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>

Edited-by: Paul Jakma <paul.jakma@hpe.com> to start the sending of LsReq
from the nsm_negotiation_done FSM transition function for ExStart->Exchange,
rather than tacking the call to ospf_ls_req_send to the bottom of the DD
desc processing function.
Dinesh Dutt 4 years ago
parent
commit
f687b62b14
1 changed files with 8 additions and 4 deletions
  1. 8 4
      ospfd/ospf_nsm.c

+ 8 - 4
ospfd/ospf_nsm.c

@@ -306,6 +306,10 @@ nsm_negotiation_done (struct ospf_neighbor *nbr)
     LSDB_LOOP (OPAQUE_AS_LSDB (nbr->oi->ospf), rn, lsa)
       ospf_db_summary_add (nbr, lsa);
 
+  /* Send Link State Request. */
+  if (nbr->t_ls_req == NULL)
+    ospf_ls_req_send (nbr);
+
   return 0;
 }
 
@@ -314,10 +318,10 @@ nsm_exchange_done (struct ospf_neighbor *nbr)
 {
   if (ospf_ls_request_isempty (nbr))
     return NSM_Full;
-
-  /* Send Link State Request. */
-  ospf_ls_req_send (nbr);
-
+  
+  if (nbr->t_ls_req == NULL)
+    ospf_ls_req_send (nbr);
+  
   return NSM_Loading;
 }