Revision ad5453b5

View differences:

proto/ospf/topology.c
502 502
    }
503 503
}
504 504

  
505
/* This is very uneficient, please don't call it often */
506

  
507
/* I should also test for every LSA if it's in some link state
508
 * retransmision list for every neighbor. I will not test it.
509
 * It can happen that I'll receive some strange ls ack's.
510
 */
511

  
512
int
513
can_flush_lsa(struct ospf_area *oa)
514
{
515
  struct ospf_iface *ifa;
516
  struct ospf_neighbor *n;
517
  struct proto_ospf *po=oa->po;
518
  int flush=1;
519

  
520
  WALK_LIST(ifa, iface_list)
521
  {
522
    if(ifa->oa==oa)
523
    {
524
      WALK_LIST(n, ifa->neigh_list)
525
      {
526
        if(n->state==NEIGHBOR_EXCHANGE||n->state==NEIGHBOR_LOADING)
527
	{
528
	  flush=0;
529
	  break;
530
	}
531
      }
532
    }
533
  }
534

  
535
  return flush;
536
}
proto/ospf/topology.h
48 48
void addifa_rtlsa(struct ospf_iface *ifa);
49 49
void originate_rt_lsa(struct ospf_area *oa,struct proto_ospf *po);
50 50
void originate_net_lsa(struct ospf_iface *ifa,struct proto_ospf *po);
51
int can_flush_lsa(struct ospf_area *oa);
51 52

  
52 53
#endif /* _BIRD_OSPF_TOPOLOGY_H_ */

Also available in: Unified diff