]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Be sure, that ospf_area is aged before routing table calculation.
authorOndrej Filip <feela@network.cz>
Sun, 6 Jun 2004 17:03:56 +0000 (17:03 +0000)
committerOndrej Filip <feela@network.cz>
Sun, 6 Jun 2004 17:03:56 +0000 (17:03 +0000)
proto/ospf/lsalib.c
proto/ospf/rt.c
proto/ospf/topology.c

index 80649f539bc27a3c5dac5b02dccfce03e19e7174..fcf23fc6a25c83b2cc5d47746ae87f4e686caf71 100644 (file)
@@ -49,7 +49,7 @@ ospf_age(struct ospf_area *oa)
 
   WALK_SLIST_DELSAFE(en, nxt, oa->lsal)
   {
-    if (po->calcrt)
+    if (oa->rt && (oa->rt->dist != LSINFINITY))
     {
       en->color = OUTSPF;
       en->dist = LSINFINITY;
index cbd53f65271de40c6d4d40feaf2bbd6da3569e33..78eb8025c5b45e57928c6fe42118e9c148f82be9 100644 (file)
@@ -69,6 +69,9 @@ ospf_rt_spfa(struct ospf_area *oa)
   if (oa->rt == NULL)
     return;
 
+  if (oa->rt->dist != LSINFINITY)
+    ospf_age(oa);
+
   FIB_WALK(in, nftmp)
   {
     nf = (struct infib *) nftmp;
index 6a6eb01d5607b8973cfbb78872b944bd60039290..75e074a73af5ff05366f79660698597232a338cf 100644 (file)
@@ -201,6 +201,7 @@ originate_rt_lsa(struct ospf_area *oa)
   lsasum_calculate(&lsa, body, po);
   en = lsa_install_new(&lsa, body, oa);
   oa->rt = en;
+  en->dist = 0; /* Force area aging */
   ospf_lsupd_flood(NULL, NULL, &oa->rt->lsa, NULL, oa, 1);
   schedule_rtcalc(po);
   oa->origrt = 0;