Revision ad5453b5 proto/ospf/topology.c

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
}

Also available in: Unified diff