Revision 67cc9135 proto/ospf/topology.c

View differences:

proto/ospf/topology.c
192 192
    	/* FIXME 16?? (Oh, sweet 16.... :-) */
193 193
    po->areano++;
194 194
    DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an);
195
    ifa->oa=oa;
196
    schedule_rt_lsa(oa);
195 197
  }
196

  
197
  ifa->oa=oa;
198

  
199
  originate_rt_lsa(oa);
200
  DBG("RT LSA: rt: %I, id: %I, type: %u\n",oa->rt->lsa.rt,oa->rt->lsa.id,oa->rt->lsa.type);
201
  flood_lsa(NULL,NULL,&oa->rt->lsa,po,NULL,oa,1);
198
  else ifa->oa=oa;
202 199
}
203 200

  
204 201
void
......
353 350
  u32 rtid=po->proto.cf->global->router_id;
354 351
  struct top_hash_entry *en=NULL;
355 352
  void *body=NULL;
356
  struct ospf_iface *ifa;
353
  struct ospf_area *oa;
357 354

  
358 355
  debug("%s: Originating Ext lsa for %I/%d.\n", po->proto.name, n->n.prefix,
359 356
    n->n.pxlen);
......
367 364
  lsa.length=sizeof(struct ospf_lsa_ext)+sizeof(struct ospf_lsa_ext_tos)+
368 365
    sizeof(struct ospf_lsa_header);
369 366
  lsasum_calculate(&lsa,body,po);
370
  WALK_LIST(ifa, po->iface_list)
367
  WALK_LIST(oa, po->area_list)
371 368
  {
372
    en=lsa_install_new(&lsa, body, ifa->oa, &po->proto);
369
    en=lsa_install_new(&lsa, body, oa, &po->proto);
370
    flood_lsa(NULL,NULL,&en->lsa,po,NULL,oa,1);
371
    body=originate_ext_lsa_body(n, e, po, attrs);
373 372
  }
374
  if(en==NULL) die("Some bug in Ext lsa generating\n");
375
  flood_lsa(NULL,NULL,&en->lsa,po,NULL,ifa->oa,1);
373
  mb_free(body);
376 374
}
377 375

  
378 376

  

Also available in: Unified diff