diff options
author | dg <dg@FreeBSD.org> | 1995-10-21 02:12:20 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-10-21 02:12:20 +0000 |
commit | 6eb3fd64375fc7515fc4c3fe3f48b32c6278db54 (patch) | |
tree | bf8f656659e662a68902bf2a946d98550908f041 | |
parent | 6d6a401f8b20e250ab7d9a640a899fae0c5a017c (diff) | |
download | FreeBSD-src-6eb3fd64375fc7515fc4c3fe3f48b32c6278db54.zip FreeBSD-src-6eb3fd64375fc7515fc4c3fe3f48b32c6278db54.tar.gz |
Fix panic caused by PRU_CONTROL not being dealt with properly. Bug pointed
out by David Maltz <dmaltz@orval.mach.cs.cmu.edu>, but this fix is by me.
-rw-r--r-- | sys/netinet/raw_ip.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index d73c45c..6142e2b 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $Id: raw_ip.c,v 1.21 1995/07/24 16:33:51 wollman Exp $ + * $Id: raw_ip.c,v 1.22 1995/09/21 19:59:43 wollman Exp $ */ #include <sys/param.h> @@ -50,9 +50,10 @@ #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> #include <netinet/ip_var.h> #include <netinet/ip_mroute.h> -#include <netinet/in_pcb.h> #include <netinet/ip_fw.h> @@ -303,6 +304,11 @@ rip_usrreq(so, req, m, nam, control) { register int error = 0; register struct inpcb *inp = sotoinpcb(so); + + if (req == PRU_CONTROL) + return (in_control(so, (u_long)m, (caddr_t)nam, + (struct ifnet *)control)); + switch (req) { case PRU_ATTACH: |