Revision e87a95d9 nest/rt-fib.c

View differences:

nest/rt-fib.c
568 568
void
569 569
fib_check(struct fib *f)
570 570
{
571
#if 0
572
  uint i, ec, lo, nulls;
571
  uint i, ec, nulls;
573 572

  
574 573
  ec = 0;
575 574
  for(i=0; i<f->hash_size; i++)
576 575
    {
577 576
      struct fib_node *n;
578
      lo = 0;
579 577
      for(n=f->hash_table[i]; n; n=n->next)
580 578
	{
581 579
	  struct fib_iterator *j, *j0;
582
	  uint h0 = ipa_hash(n->prefix);
583
	  if (h0 < lo)
584
	    bug("fib_check: discord in hash chains");
585
	  lo = h0;
586
	  if ((h0 >> f->hash_shift) != i)
580
	  uint h0 = fib_hash(f, n->addr);
581
	  if (h0 != i)
587 582
	    bug("fib_check: mishashed %x->%x (order %d)", h0, i, f->hash_order);
588 583
	  j0 = (struct fib_iterator *) n;
589 584
	  nulls = 0;
......
604 599
    }
605 600
  if (ec != f->entries)
606 601
    bug("fib_check: invalid entry count (%d != %d)", ec, f->entries);
607
#endif
608 602
  return;
609 603
}
610 604

  

Also available in: Unified diff