]> git.puffer.fish Git - matthieu/frr.git/commitdiff
When an LSA is flushed we need to update the timestamps for them. This
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:24:44 +0000 (17:24 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:24:44 +0000 (17:24 -0700)
allows for the node to give the neighbor sufficient time to send back
an acknowledgement before retransmission kicks in.

Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Reviewed-by: James Li <jli@cumulusnetworks.com>
ospfd/ospf_flood.c

index 2c33b00ef9c2ec14be35460fe7ce60e5744c60a7..d18314a9d9253a24e444593ece62a84adaf3e9c8 100644 (file)
@@ -980,7 +980,12 @@ ospf_ls_retransmit_delete_nbr_as (struct ospf *ospf, struct ospf_lsa *lsa)
 void
 ospf_lsa_flush_area (struct ospf_lsa *lsa, struct ospf_area *area)
 {
+  /* Reset the lsa origination time such that it gives
+     more time for the ACK to be received and avoid
+     retransmissions */
   lsa->data->ls_age = htons (OSPF_LSA_MAXAGE);
+  lsa->tv_recv = recent_relative_time ();
+  lsa->tv_orig = lsa->tv_recv;
   ospf_flood_through_area (area, NULL, lsa);
   ospf_lsa_maxage (area->ospf, lsa);
 }
@@ -988,7 +993,12 @@ ospf_lsa_flush_area (struct ospf_lsa *lsa, struct ospf_area *area)
 void
 ospf_lsa_flush_as (struct ospf *ospf, struct ospf_lsa *lsa)
 {
+  /* Reset the lsa origination time such that it gives
+     more time for the ACK to be received and avoid
+     retransmissions */
   lsa->data->ls_age = htons (OSPF_LSA_MAXAGE);
+  lsa->tv_recv = recent_relative_time ();
+  lsa->tv_orig = lsa->tv_recv;
   ospf_flood_through_as (ospf, NULL, lsa);
   ospf_lsa_maxage (ospf, lsa);
 }