diff options
author | Dinesh G Dutt <ddutt@cumulusnetworks.com> | 2014-09-30 14:11:17 -0700 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2014-11-11 17:25:47 +0000 |
commit | 8306be211f1bcd5a19e74d08cde399e1b518ed25 (patch) | |
tree | 6423afa35f2cebf24888c2a4b089399b05a9c895 /ospfd | |
parent | 6d831139569dbee69acc631361db917e2c47feeb (diff) | |
download | quagga-8306be211f1bcd5a19e74d08cde399e1b518ed25.tar.bz2 quagga-8306be211f1bcd5a19e74d08cde399e1b518ed25.tar.xz |
OSPFd: Update timestamps when we MaxAge LSAs.
When an LSA is flushed we need to update the timestamps for them. This
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>
Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_flood.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 2c33b00e..d18314a9 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -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); } |