Date: Wed, 5 Apr 2006 14:42:18 GMT From: "George V. Neville-Neil" <gnn@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94680 for review Message-ID: <200604051442.k35EgIKJ082070@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94680 Change 94680 by gnn@gnn_devbox_fast_ipsec on 2006/04/05 14:41:52 Integrate some more bits from rwatsons stuff Affected files ... .. //depot/projects/gnn_fast_ipsec/src/lib/libipsec/Makefile#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netipsec/keysock.c#4 edit Differences ... ==== //depot/projects/gnn_fast_ipsec/src/lib/libipsec/Makefile#2 (text+ko) ==== @@ -25,14 +25,17 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/lib/libipsec/Makefile,v 1.17 2005/07/22 17:19:01 kensmith Exp $ +# $FreeBSD: src/lib/libipsec/Makefile,v 1.19 2006/03/18 11:01:06 ru Exp $ + +SHLIBDIR?= /lib + +.include <bsd.own.mk> LIB= ipsec -SHLIBDIR?= /lib SHLIB_MAJOR= 2 CFLAGS+=-I. -I${.CURDIR} CFLAGS+=-DIPSEC_DEBUG -DIPSEC -.if !defined(NO_INET6) +.if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 .endif ==== //depot/projects/gnn_fast_ipsec/src/sys/netipsec/keysock.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netipsec/keysock.c,v 1.12 2006/01/21 10:44:34 bz Exp $ */ +/* $FreeBSD: src/sys/netipsec/keysock.c,v 1.14 2006/04/01 15:42:01 rwatson Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ /*- @@ -369,14 +369,11 @@ * key_abort() * derived from net/rtsock.c:rts_abort() */ -static int +static void key_abort(struct socket *so) { - int s, error; - s = splnet(); - error = raw_usrreqs.pru_abort(so); - splx(s); - return error; + + raw_usrreqs.pru_abort(so); } /* @@ -459,24 +456,20 @@ * key_detach() * derived from net/rtsock.c:rts_detach() */ -static int +static void key_detach(struct socket *so) { struct keycb *kp = (struct keycb *)sotorawcb(so); int s, error; - s = splnet(); - if (kp != 0) { - if (kp->kp_raw.rcb_proto.sp_protocol - == PF_KEY) /* XXX: AF_KEY */ - key_cb.key_count--; - key_cb.any_count--; + KASSERT(kp != NULL, ("key_detach: kp == NULL")); + if (kp->kp_raw.rcb_proto.sp_protocol + == PF_KEY) /* XXX: AF_KEY */ + key_cb.key_count--; + key_cb.any_count--; - key_freereg(so); - } - error = raw_usrreqs.pru_detach(so); - splx(s); - return error; + key_freereg(so); + raw_usrreqs.pru_detach(so); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604051442.k35EgIKJ082070>