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;
struct top_hash_entry *en,*nxt;
int flush=0;
- /* FIXME Fill flush! */
+ flush=can_flush_lsa(oa);
if((delta=now-oa->lage)>=AGINGDELTA)
{
struct ospf_iface *ifa;
struct ospf_neighbor *n;
struct proto_ospf *po=oa->po;
- int flush=1;
WALK_LIST(ifa, iface_list)
{
{
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;
}