]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added #if 0 to rip_postconfig(), so that it doesn't crash whole daemon
authorMartin Mares <mj@ucw.cz>
Sun, 20 Dec 1998 14:26:57 +0000 (14:26 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 20 Dec 1998 14:26:57 +0000 (14:26 +0000)
when RIP is unconfigured.

die() -> bug()

proto/rip/rip.c
proto/rip/rip.h

index cbdaea0837f3c9c92acdf67274b7791f216ae7d8..d5107a6d432bbb17524659f01f2bb98b6d3e4e94 100644 (file)
@@ -194,7 +194,7 @@ rip_sendto( struct proto *p, ip_addr daddr, int dport, struct rip_interface *rif
   c->dport = dport;
   c->daddr = daddr;
   if (c->rif->sock->data != rif)
-    die("not enough send magic\n");
+    bug("not enough send magic\n");
 #if 0
   if (sk_open(c->send)<0) {
     log( L_ERR "Could not open socket for data send to %I:%d on %s\n", daddr, dport, rif->iface->name );
@@ -532,6 +532,7 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags)
 
   if (sk_open(rif->sock)<0)
     die( "RIP/%s: could not listen on %s\n", p->name, rif->iface->name );
+  /* FIXME: Should not be fatal, since the interface might have gone */
   
   return rif;
 }
@@ -657,7 +658,9 @@ rip_preconfig(struct protocol *x)
 static void
 rip_postconfig(struct protocol *p)
 {
+#if 0                                  /* Cannot do this since it crashes when RIP is unconfigured */
   new_iface(p, NULL, 0);
+#endif
 }
 
 struct protocol proto_rip = {
index cbb2ccd84b0c6bcd3b6ae194a1ab9c1f20311b78..0e010ddc78d5dd426bbac4b4fb25f634365aca72 100644 (file)
@@ -88,6 +88,6 @@ struct rip_proto {
 #define E ((struct rip_entry *) e)
 
 #define RIP_MAGIC 81861253
-#define CHK_MAGIC do { if (P->magic != RIP_MAGIC) die( "Not enough magic\n" ); } while (0)
+#define CHK_MAGIC do { if (P->magic != RIP_MAGIC) bug( "Not enough magic\n" ); } while (0)
 
 void rip_init_instance(struct proto *p);