Revision b224ca32 proto/ospf/lsalib.c

View differences:

proto/ospf/lsalib.c
10 10

  
11 11
/* FIXME Go on */
12 12
void
13
flush_lsa(struct top_hash_entry *en)
13
flush_lsa(struct top_hash_entry *en, struct ospf_area *oa)
14 14
{
15
  return;
15
  s_rem_node(SNODE en);
16
  ospf_hash_delete(oa->gr,en);
16 17
}
17 18

  
18 19
void
......
22 23
  struct proto *p=&oa->po->proto;
23 24
  if(en->lsa.age==LSA_MAXAGE)
24 25
  {
25
    if(flush) flush_lsa(en);
26
    if(flush) flush_lsa(en,oa);
26 27
    return;
27 28
  }
28 29
  if((en->lsa.rt==p->cf->global->router_id)&&(en->lsa.age>LSREFRESHTIME))
......
31 32
  }
32 33
  if((en->lsa.age+=delta)>LSA_MAXAGE)
33 34
  {
34
    if(flush) flush_lsa(en);
35
    if(flush) flush_lsa(en,oa);
35 36
    else en->lsa.age=LSA_MAXAGE;
36 37
    return;
37 38
  }
......
375 376
	  break;
376 377
	}
377 378
      }
378
      /* FIXME delete routes to stub networks! */
379 379
    }
380 380
    if(change) s_rem_node(SNODE en);
381 381
  }
......
386 386
    en->inst_t=now;
387 387
    if(en->lsa_body!=NULL) mb_free(en->lsa_body);
388 388
    en->lsa_body=body;
389
    en->lsa.length=lsa->length;
390 389
    memcpy(&en->lsa,lsa,sizeof(struct ospf_lsa_header));
391 390
    /* FIXME decide if route calcualtion must be done and how */
392 391
    if(oa->rt!=NULL)

Also available in: Unified diff