Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v retrieving revision 1.91 retrieving revision 1.91.2.1 diff -u -p -r1.91 -r1.91.2.1 --- src/sys/netinet/raw_ip.c 2006/09/08 20:58:58 1.91 +++ src/sys/netinet/raw_ip.c 2006/10/22 06:07:28 1.91.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.91 2006/09/08 20:58:58 elad Exp $ */ +/* $NetBSD: raw_ip.c,v 1.91.2.1 2006/10/22 06:07:28 yamt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.91 2006/09/08 20:58:58 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.91.2.1 2006/10/22 06:07:28 yamt Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -516,14 +516,16 @@ rip_usrreq(struct socket *so, int req, return (in_control(so, (long)m, (caddr_t)nam, (struct ifnet *)control, l)); + s = splsoftnet(); + if (req == PRU_PURGEIF) { in_pcbpurgeif0(&rawcbtable, (struct ifnet *)control); in_purgeif((struct ifnet *)control); in_pcbpurgeif(&rawcbtable, (struct ifnet *)control); + splx(s); return (0); } - s = splsoftnet(); inp = sotoinpcb(so); #ifdef DIAGNOSTIC if (req != PRU_SEND && req != PRU_SENDOOB && control) @@ -543,7 +545,7 @@ rip_usrreq(struct socket *so, int req, } if (l == 0 || (error = kauth_authorize_network(l->l_cred, KAUTH_NETWORK_SOCKET, - (void *)KAUTH_REQ_NETWORK_SOCKET_RAWSOCK, so, NULL, + KAUTH_REQ_NETWORK_SOCKET_RAWSOCK, so, NULL, NULL))) { error = EACCES; break;