Revision 08c69a77

View differences:

nest/iface.c
341 341
	(!j || ipa_to_u32(i->ip) < ipa_to_u32(j->ip)))
342 342
      j = i;
343 343
  if (!j)				/* FIXME: allow configuration or running without RID */
344
    die("Cannot determine router ID, please configure manually");
344
    bug("Cannot determine router ID, please configure manually");
345 345
  router_id = ipa_to_u32(j->ip);
346 346
  debug("Router ID set to %08x (%s)\n", router_id, j->name);
347 347
}
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
nest/rt-table.c
97 97
  if (new->attrs->proto != old->attrs->proto)
98 98
    {
99 99
      /* FIXME!!! */
100
      die("Different protocols, but identical preferences => oops");
100
      bug("Different protocols, but identical preferences => oops");
101 101
    }
102 102
  if (better = new->attrs->proto->rte_better)
103 103
    return better(new, old);
proto/static/static.c
82 82
	  break;
83 83
	}
84 84
      case RTD_DEVICE:
85
	die("Static device routes are not supported");
85
	bug("Static device routes are not supported");
86 86
	/* FIXME: Static device routes */
87 87
      default:
88 88
	static_install(p, r, NULL);
sysdep/linux/krt-scan.c
291 291
	  rte_update(n, &p->p, new);
292 292
	  break;
293 293
	default:
294
	  die("krt_prune: invalid route status");
294
	  bug("krt_prune: invalid route status");
295 295
	}
296 296

  
297 297
      if (old)
sysdep/unix/io.c
293 293
get_sockaddr(struct sockaddr_in *sa, ip_addr *a, unsigned *port)
294 294
{
295 295
  if (sa->sin_family != AF_INET)
296
    die("get_sockaddr called for wrong address family");
296
    bug("get_sockaddr called for wrong address family");
297 297
  if (port)
298 298
    *port = ntohs(sa->sin_port);
299 299
  memcpy(a, &sa->sin_addr.s_addr, sizeof(*a));
......
379 379
      fd = socket(PF_INET, SOCK_RAW, s->dport);
380 380
      break;
381 381
    default:
382
      die("sk_open() called for invalid sock type %d", s->type);
382
      bug("sk_open() called for invalid sock type %d", s->type);
383 383
    }
384 384
  if (fd < 0)
385 385
    die("sk_open: socket: %m");
......
530 530
	return 1;
531 531
      }
532 532
    default:
533
      die("sk_maybe_write: unknown socket type %d", s->type);
533
      bug("sk_maybe_write: unknown socket type %d", s->type);
534 534
    }
535 535
}
536 536

  
sysdep/unix/krt-set.c
77 77
      break;
78 78
#endif
79 79
    default:
80
      die("krt set: unknown flags, but not filtered");
80
      bug("krt set: unknown flags, but not filtered");
81 81
    }
82 82

  
83 83
  if (ioctl(if_scan_sock, ioc, &re) < 0)
......
127 127
krt_set_preconfig(struct krt_proto *x)
128 128
{
129 129
  if (if_scan_sock < 0)
130
    die("krt set: missing socket");
130
    bug("krt set: missing socket");
131 131
  x->p.rt_notify = krt_set_notify;
132 132
}
sysdep/unix/main.c
121 121
  debug("Entering I/O loop.\n");
122 122

  
123 123
  io_loop();
124
  die("I/O loop died");
124
  bug("I/O loop died");
125 125
}

Also available in: Unified diff