From owner-p4-projects@FreeBSD.ORG Sat May 17 11:26:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E240C106567D; Sat, 17 May 2008 11:26:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4A15106564A for ; Sat, 17 May 2008 11:26:45 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 924308FC16 for ; Sat, 17 May 2008 11:26:45 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4HBQjA2053641 for ; Sat, 17 May 2008 11:26:45 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4HBQjpv053639 for perforce@freebsd.org; Sat, 17 May 2008 11:26:45 GMT (envelope-from jb@freebsd.org) Date: Sat, 17 May 2008 11:26:45 GMT Message-Id: <200805171126.m4HBQjpv053639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 141757 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: Sat, 17 May 2008 11:26:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=141757 Change 141757 by jb@freebsd3 on 2008/05/17 11:26:08 IFC Affected files ... .. //depot/projects/dtrace/src/sys/net/if.c#17 integrate .. //depot/projects/dtrace/src/sys/netipsec/ipsec.h#8 integrate .. //depot/projects/dtrace/src/sys/netipsec/ipsec_osdep.h#6 delete .. //depot/projects/dtrace/src/tools/test/README#5 integrate .. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#32 integrate Differences ... ==== //depot/projects/dtrace/src/sys/net/if.c#17 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/net/if.c,v 1.279 2008/05/09 23:02:56 julian Exp $ + * $FreeBSD: src/sys/net/if.c,v 1.280 2008/05/17 03:38:13 brooks Exp $ */ #include "opt_compat.h" @@ -111,7 +111,6 @@ static void if_freemulti(struct ifmultiaddr *); static void if_grow(void); static void if_init(void *); -static void if_check(void *); static void if_qflush(struct ifaltq *); static void if_route(struct ifnet *, int flag, int fam); static int if_setflag(struct ifnet *, int, int, int *, int); @@ -155,7 +154,7 @@ * System initialization */ SYSINIT(interfaces, SI_SUB_INIT_IF, SI_ORDER_FIRST, if_init, NULL); -SYSINIT(interface_check, SI_SUB_PROTO_IF, SI_ORDER_FIRST, if_check, NULL); +SYSINIT(interface_check, SI_SUB_PROTO_IF, SI_ORDER_FIRST, if_slowtimo, NULL); MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals"); MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); @@ -320,32 +319,6 @@ ifindex_table = e; } -/* ARGSUSED*/ -static void -if_check(void *dummy __unused) -{ - struct ifnet *ifp; - int s; - - s = splimp(); - IFNET_RLOCK(); /* could sleep on rare error; mostly okay XXX */ - TAILQ_FOREACH(ifp, &ifnet, if_link) { - if (ifp->if_snd.ifq_maxlen == 0) { - if_printf(ifp, "XXX: driver didn't set ifq_maxlen\n"); - ifp->if_snd.ifq_maxlen = ifqmaxlen; - } - if (!mtx_initialized(&ifp->if_snd.ifq_mtx)) { - if_printf(ifp, - "XXX: driver didn't initialize queue mtx\n"); - mtx_init(&ifp->if_snd.ifq_mtx, "unknown", - MTX_NETWORK_LOCK, MTX_DEF); - } - } - IFNET_RUNLOCK(); - splx(s); - if_slowtimo(0); -} - /* * Allocate a struct ifnet and an index for an interface. A layer 2 * common structure will also be allocated if an allocation routine is @@ -525,6 +498,15 @@ ifa->ifa_refcnt = 1; TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link); ifp->if_broadcastaddr = NULL; /* reliably crash if used uninitialized */ + + /* + * XXX: why do we warn about this? We're correcting it and most + * drivers just set the value the way we do. + */ + if (ifp->if_snd.ifq_maxlen == 0) { + if_printf(ifp, "XXX: driver didn't set ifq_maxlen\n"); + ifp->if_snd.ifq_maxlen = ifqmaxlen; + } ifp->if_snd.altq_type = 0; ifp->if_snd.altq_disc = NULL; ifp->if_snd.altq_flags &= ALTQF_CANTCHANGE; ==== //depot/projects/dtrace/src/sys/netipsec/ipsec.h#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netipsec/ipsec.h,v 1.15 2008/02/02 14:11:31 bz Exp $ */ +/* $FreeBSD: src/sys/netipsec/ipsec.h,v 1.16 2008/05/17 04:00:11 gnn Exp $ */ /* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */ /*- @@ -44,10 +44,17 @@ #include #include -#include #ifdef _KERNEL +#define IPSEC_SPLASSERT_SOFTNET(_m) /* XXX-BZ remove me */ +#define IPSEC_ASSERT(_c,_m) KASSERT(_c, _m) + +#define IPSEC_IS_PRIVILEGED_SO(_so) \ + ((_so)->so_cred != NULL && \ + priv_check_cred((_so)->so_cred, PRIV_NETINET_IPSEC, 0) \ + == 0) + /* * Security Policy Index * Ensure that both address families in the "src" and "dst" are same. ==== //depot/projects/dtrace/src/tools/test/README#5 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/tools/test/README,v 1.4 2001/10/08 12:28:31 asmodai Exp $ +$FreeBSD: src/tools/test/README,v 1.5 2008/05/17 02:09:48 jb Exp $ This directory is for test programs. ==== //depot/projects/dtrace/src/tools/test/dtrace/Makefile#32 (text+ko) ====