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.
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index b43d885..5c01a58 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -306,6 +306,10 @@
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 @@
{
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;
}