Revision 08c69a77 nest/rt-fib.c

View differences:

nest/rt-fib.c
132 132
    return e;
133 133
#ifdef DEBUGGING
134 134
  if (len < 0 || len > BITS_PER_IP_ADDRESS || !ip_is_prefix(*a,len))
135
    die("fib_get() called for invalid address");
135
    bug("fib_get() called for invalid address");
136 136
#endif
137 137
  e = sl_alloc(f->fib_slab);
138 138
  e->prefix = *a;
......
215 215
	}
216 216
      ee = &((*ee)->next);
217 217
    }
218
  die("fib_delete() called for invalid node");
218
  bug("fib_delete() called for invalid node");
219 219
}
220 220

  
221 221
void
......
305 305
	  struct fib_iterator *j, *j0;
306 306
	  unsigned int h0 = ipa_hash(n->prefix);
307 307
	  if (h0 < lo)
308
	    die("fib_check: discord in hash chains");
308
	    bug("fib_check: discord in hash chains");
309 309
	  lo = h0;
310 310
	  if ((h0 >> f->hash_shift) != i)
311
	    die("fib_check: mishashed %x->%x (order %d)", h0, i, f->hash_order);
311
	    bug("fib_check: mishashed %x->%x (order %d)", h0, i, f->hash_order);
312 312
	  j0 = (struct fib_iterator *) n;
313 313
	  nulls = 0;
314 314
	  for(j=n->readers; j; j=j->next)
315 315
	    {
316 316
	      if (j->prev != j0)
317
		die("fib_check: iterator->prev mismatch");
317
		bug("fib_check: iterator->prev mismatch");
318 318
	      j0 = j;
319 319
	      if (!j->node)
320 320
		nulls++;
321 321
	      else if (nulls)
322
		die("fib_check: iterator nullified");
322
		bug("fib_check: iterator nullified");
323 323
	      else if (j->node != n)
324
		die("fib_check: iterator->node mismatch");
324
		bug("fib_check: iterator->node mismatch");
325 325
	    }
326 326
	  ec++;
327 327
	}
328 328
    }
329 329
  if (ec != f->entries)
330
    die("fib_check: invalid entry count (%d != %d)", ec, f->entries);
330
    bug("fib_check: invalid entry count (%d != %d)", ec, f->entries);
331 331
}
332 332

  
333 333
#endif

Also available in: Unified diff