summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-03 22:36:12 +0000
committerOndrej Filip <feela@network.cz>2000-05-03 22:36:12 +0000
commit9e48d717cf681dcc3cfaaee4358b5c6fa3aa409e (patch)
tree6796b8f0450a3acac8c877c4d54afa7221bdada0 /proto/ospf
parenta02c6c184b513fe1886c86533e696045e960515b (diff)
Test for "flushing" added.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/rt.c4
-rw-r--r--proto/ospf/topology.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index bd2aa876..4625df6b 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -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;
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 57ac0888..22f463c3 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -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;
}