summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_flood.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-08-19 06:56:53 +0000
committerhasso <hasso>2004-08-19 06:56:53 +0000
commit3b68735fc38871bdcc9fc19f38fab244f86e710b (patch)
tree3a98be6997b0fc0e0bd211a877ab477cb7e3d328 /ospf6d/ospf6_flood.c
parent0de1cde6e602e7496628967aeb219cd28d4869a9 (diff)
downloadquagga-3b68735fc38871bdcc9fc19f38fab244f86e710b.tar.bz2
quagga-3b68735fc38871bdcc9fc19f38fab244f86e710b.tar.xz
Merge svn revisions 924 and 925 from Zebra CVS. Also remove useless
ospf6_lsdb prototype declaration from ospf6_lsa.h. Report sent to Yasuhiro Ohara as well.
Diffstat (limited to 'ospf6d/ospf6_flood.c')
-rw-r--r--ospf6d/ospf6_flood.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index aeff15bc..05112021 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -204,6 +204,7 @@ void
ospf6_install_lsa (struct ospf6_lsa *lsa)
{
struct ospf6_lsa *old;
+ struct timeval now;
if (IS_OSPF6_DEBUG_LSA (RECV) || IS_OSPF6_DEBUG_LSA (DATABASE))
zlog_info ("Install LSA: %s", lsa->name);
@@ -213,10 +214,20 @@ ospf6_install_lsa (struct ospf6_lsa *lsa)
old = ospf6_lsdb_lookup (lsa->header->type, lsa->header->id,
lsa->header->adv_router, lsa->lsdb);
if (old)
- ospf6_flood_clear (old);
+ {
+ THREAD_OFF (old->expire);
+ ospf6_flood_clear (old);
+ }
+
+ gettimeofday (&now, (struct timezone *) NULL);
+ if (ospf6_lsa_age_current (lsa) != MAXAGE)
+ lsa->expire = thread_add_timer (master, ospf6_lsa_expire, lsa,
+ MAXAGE + lsa->birth.tv_sec - now.tv_sec);
+ else
+ lsa->expire = NULL;
/* actually install */
- gettimeofday (&lsa->installed, (struct timezone *) NULL);
+ lsa->installed = now;
ospf6_lsdb_add (lsa, lsa->lsdb);
return;