summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2013-02-20 10:00:52 +0000
committerDavid Lamparter <equinox@diac24.net>2013-04-20 06:12:13 +0200
commit4de8bf001189d40e086764fd804e59657d2e21e6 (patch)
tree367c46fff12691e2622abc1d23ea0f95fdb97504 /ospfd
parent77ef01392f82c27a9892840c61a5e7391fd82415 (diff)
ospfd: make ospf_maxage_lsa_remover actually yield
ospf_maxage_lsa_remover whould check whether to yield, but run on anyway. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_lsa.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index dfd1a61e..e0e05ab8 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2843,6 +2843,9 @@ ospf_maxage_lsa_remover (struct thread *thread)
continue;
}
+ /* There is at least one neighbor from which we still await an ack
+ * for that LSA, so we are not allowed to remove it from our lsdb yet
+ * as per RFC 2328 section 14 para 4 a) */
if (lsa->retransmit_counter > 0)
{
reschedule = 1;
@@ -2851,7 +2854,10 @@ ospf_maxage_lsa_remover (struct thread *thread)
/* TODO: maybe convert this function to a work-queue */
if (thread_should_yield (thread))
- OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0);
+ {
+ OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0);
+ return 0;
+ }
/* Remove LSA from the LSDB */
if (IS_LSA_SELF (lsa))