diff options
author | wollman <wollman@FreeBSD.org> | 1996-08-27 16:22:05 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-08-27 16:22:05 +0000 |
commit | d8acfc1242287034b488b68b2e7cbc9eb77eca20 (patch) | |
tree | b7d8d0f637b06c8682c5e4f6c7d874a8d0684fdd /usr.sbin/routed/main.c | |
parent | 5af28cc1576c5d5f5d3fbe2ac63044a9727dc7eb (diff) | |
download | FreeBSD-src-d8acfc1242287034b488b68b2e7cbc9eb77eca20.zip FreeBSD-src-d8acfc1242287034b488b68b2e7cbc9eb77eca20.tar.gz |
Merge new routed from vendor branch.
Diffstat (limited to 'usr.sbin/routed/main.c')
-rw-r--r-- | usr.sbin/routed/main.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/usr.sbin/routed/main.c b/usr.sbin/routed/main.c index 20b72d8..b96fe71 100644 --- a/usr.sbin/routed/main.c +++ b/usr.sbin/routed/main.c @@ -34,9 +34,12 @@ char copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#if !defined(lint) && !defined(sgi) +#if !defined(lint) && !defined(sgi) && !defined(__NetBSD__) static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93"; -#endif /* not lint */ +#elif defined(__NetBSD__) +static char rcsid[] = "$NetBSD$"; +#endif +#ident "$Revision: 1.1.3.3 $" #include "defs.h" #include "pathnames.h" @@ -272,14 +275,7 @@ usage: if (setsockopt(rt_sock, SOL_SOCKET,SO_USELOOPBACK, &off,sizeof(off)) < 0) LOGERR("setsockopt(SO_USELOOPBACK,0)"); - - /* prepare Router Discovery socket. - */ - rdisc_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); - if (rdisc_sock < 0) - BADERR(1,"rdisc_sock = socket()"); - fix_sock(rdisc_sock,"rdisc_sock"); - + fix_select(); @@ -733,6 +729,19 @@ rip_on(struct interface *ifp) } +/* die if malloc(3) fails + */ +void * +rtmalloc(size_t size, + char *msg) +{ + void *p = malloc(size); + if (p == 0) + logbad(1,"malloc() failed in %s", msg); + return p; +} + + /* get a random instant in an interval */ void |