summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2009-01-05 17:44:46 +0100
committerPaul Jakma <paul@quagga.net>2009-06-26 16:12:19 +0100
commitbd2462425205a681d75e04c94a94bf4cea5da58b (patch)
tree326c2dde485eded444cde3db284aeb7a348892bf /ospfd/ospf_lsa.c
parent650f76c2e1b0b12e1c46fdd3be22c5f505245d83 (diff)
[ospfd] Do not use stale Network/Router LSAs
Should a self originated Network/Router LSA with higher LS seq. nr. be received we should flood and install it in the LSDB but we cannot use it for our internal calculations as it is stale. Reorginate an new LSA to replace the stale one as soon as possible.
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 18eed79e..15a6a4c4 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2451,7 +2451,10 @@ ospf_router_lsa_install (struct ospf *ospf,
if (rt_recalc)
ospf_spf_calculate_schedule (ospf);
- if (IS_LSA_SELF (new))
+ /* Only install LSA if it is originated/refreshed by us.
+ * If LSA was received by flooding, the RECEIVED flag is set so do
+ * not link the LSA */
+ if (IS_LSA_SELF (new) && !CHECK_FLAG (new->flags, OSPF_LSA_RECEIVED))
{
/* Set router-LSA refresh timer. */
OSPF_TIMER_OFF (area->t_router_lsa_self);