]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Test for "flushing" added.
authorOndrej Filip <feela@network.cz>
Wed, 3 May 2000 22:36:12 +0000 (22:36 +0000)
committerOndrej Filip <feela@network.cz>
Wed, 3 May 2000 22:36:12 +0000 (22:36 +0000)
proto/ospf/rt.c
proto/ospf/topology.c

index bd2aa876ca482a8412f6f09c003bc76e709bae1c..4625df6b5b50e4a7fe730dda2deff6ae93bfa3db 100644 (file)
@@ -30,14 +30,14 @@ ospf_rt_spfa(struct ospf_area *oa)
   int age=0,flush=0;
   struct proto *p=&oa->po->proto;
 
-  /* FIXME if I'm not in LOADING or EXCHANGE set flush=1 */
+  flush=can_flush_lsa(oa);
   if((delta=now-oa->lage)>=AGINGDELTA)
   {
      oa->lage=now;
      age=1;
   }
 
-  WALK_SLIST_DELSAFE(SNODE en, nx, oa->lsal)   /* FIXME Make it DELSAFE */
+  WALK_SLIST_DELSAFE(SNODE en, nx, oa->lsal)
   {
     en->color=OUTSPF;
     en->dist=LSINFINITY;
index 57ac08888bbbe795aab45ddce16d2c67466fb361..22f463c3f1b1d210005f27603b1a65546bc70249 100644 (file)
@@ -159,7 +159,7 @@ age_timer_hook(timer *timer)
   struct top_hash_entry *en,*nxt;
   int flush=0;
 
-  /* FIXME Fill flush! */
+  flush=can_flush_lsa(oa);
 
   if((delta=now-oa->lage)>=AGINGDELTA)
   {
@@ -515,7 +515,6 @@ can_flush_lsa(struct ospf_area *oa)
   struct ospf_iface *ifa;
   struct ospf_neighbor *n;
   struct proto_ospf *po=oa->po;
-  int flush=1;
 
   WALK_LIST(ifa, iface_list)
   {
@@ -523,14 +522,13 @@ can_flush_lsa(struct ospf_area *oa)
     {
       WALK_LIST(n, ifa->neigh_list)
       {
-        if(n->state==NEIGHBOR_EXCHANGE||n->state==NEIGHBOR_LOADING)
+        if((n->state==NEIGHBOR_EXCHANGE)||(n->state==NEIGHBOR_LOADING))
        {
-         flush=0;
-         break;
+         return 0;
        }
       }
     }
   }
 
-  return flush;
+  return 1;
 }