diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-12-23 08:47:08 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-12-23 08:47:08 +0000 |
commit | 5fc79652fb47e321627cf0029c407f2eb5059f5b (patch) | |
tree | f8678d74bda8184fb5f1d100c7727ed3a8d398c2 /sys/netns | |
parent | cbf4c066f14716801ab7bc08f8227a8bd14d7076 (diff) |
no panic on ppp down/retry
Diffstat (limited to 'sys/netns')
-rw-r--r-- | sys/netns/idp_usrreq.c | 8 | ||||
-rw-r--r-- | sys/netns/ns_input.c | 5 | ||||
-rw-r--r-- | sys/netns/spp_usrreq.c | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/netns/idp_usrreq.c b/sys/netns/idp_usrreq.c index c047fdb02f4..98ac9d0616c 100644 --- a/sys/netns/idp_usrreq.c +++ b/sys/netns/idp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: idp_usrreq.c,v 1.2 1996/03/04 08:20:20 niklas Exp $ */ +/* $OpenBSD: idp_usrreq.c,v 1.3 1996/12/23 08:47:06 mickey Exp $ */ /* $NetBSD: idp_usrreq.c,v 1.9 1996/02/13 22:13:43 christos Exp $ */ /* @@ -58,12 +58,11 @@ #include <netns/ns_error.h> #include <machine/stdarg.h> + /* * IDP protocol implementation. */ -struct sockaddr_ns idp_ns = { sizeof(idp_ns), AF_NS }; - /* * This may also be called for raw listeners. */ @@ -79,13 +78,14 @@ idp_input(m, va_alist) register struct nspcb *nsp; register struct idp *idp = mtod(m, struct idp *); struct ifnet *ifp = m->m_pkthdr.rcvif; + struct sockaddr_ns idp_ns = { sizeof(idp_ns), AF_NS }; va_list ap; va_start(ap, m); nsp = va_arg(ap, struct nspcb *); va_end(ap); - if (nsp==0) + if (nsp == NULL) panic("No nspcb"); /* * Construct sockaddr format source address. diff --git a/sys/netns/ns_input.c b/sys/netns/ns_input.c index af48cbf7df7..f266f24190c 100644 --- a/sys/netns/ns_input.c +++ b/sys/netns/ns_input.c @@ -1,4 +1,5 @@ -/* $OpenBSD: ns_input.c,v 1.2 1996/03/04 08:20:26 niklas Exp $ */ + +/* $OpenBSD: ns_input.c,v 1.3 1996/12/23 08:47:07 mickey Exp $ */ /* $NetBSD: ns_input.c,v 1.9 1996/02/13 22:13:56 christos Exp $ */ /* @@ -277,7 +278,7 @@ idp_ctlinput(cmd, sa, arg) case PRC_HOSTDEAD: case PRC_HOSTUNREACH: sns = arg; - if (sns->sns_family != AF_NS) + if (arg == NULL || sns->sns_family != AF_NS) return NULL; ns = &sns->sns_addr; break; diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c index 6712001e042..14558c39a35 100644 --- a/sys/netns/spp_usrreq.c +++ b/sys/netns/spp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spp_usrreq.c,v 1.3 1996/04/21 22:30:14 deraadt Exp $ */ +/* $OpenBSD: spp_usrreq.c,v 1.4 1996/12/23 08:47:07 mickey Exp $ */ /* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */ /* @@ -620,7 +620,7 @@ spp_ctlinput(cmd, sa, arg) case PRC_HOSTDEAD: case PRC_HOSTUNREACH: sns = arg; - if (sns->sns_family != AF_NS) + if (sns == NULL || sns->sns_family != AF_NS) return NULL; na = &sns->sns_addr; break; |