From owner-p4-projects@FreeBSD.ORG Wed Apr 5 14:42:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C8B7516A424; Wed, 5 Apr 2006 14:42:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E98416A401 for ; Wed, 5 Apr 2006 14:42:20 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A43C543D6E for ; Wed, 5 Apr 2006 14:42:18 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k35EgIMn082081 for ; Wed, 5 Apr 2006 14:42:18 GMT (envelope-from gnn@neville-neil.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k35EgIKJ082070 for perforce@freebsd.org; Wed, 5 Apr 2006 14:42:18 GMT (envelope-from gnn@neville-neil.com) Date: Wed, 5 Apr 2006 14:42:18 GMT Message-Id: <200604051442.k35EgIKJ082070@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gnn@neville-neil.com using -f From: "George V. Neville-Neil" To: Perforce Change Reviews Cc: Subject: PERFORCE change 94680 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2006 14:42:21 -0000 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 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); } /*