From owner-p4-projects@FreeBSD.ORG Tue Nov 11 11:47:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B3EF16A4D1; Tue, 11 Nov 2003 11:47:22 -0800 (PST) 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 34F8416A4CF for ; Tue, 11 Nov 2003 11:47:22 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A81DC43FA3 for ; Tue, 11 Nov 2003 11:47:21 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hABJlLXJ080650 for ; Tue, 11 Nov 2003 11:47:21 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hABJlLM5080647 for perforce@freebsd.org; Tue, 11 Nov 2003 11:47:21 -0800 (PST) (envelope-from sam@freebsd.org) Date: Tue, 11 Nov 2003 11:47:21 -0800 (PST) Message-Id: <200311111947.hABJlLM5080647@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 42018 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 19:47:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=42018 Change 42018 by sam@sam_ebb on 2003/11/11 11:47:01 fix compilation problems with PFIL_HOOKS changes Affected files ... .. //depot/projects/netperf/sys/netgraph/ng_ether.c#4 edit Differences ... ==== //depot/projects/netperf/sys/netgraph/ng_ether.c#4 (text+ko) ==== @@ -43,6 +43,10 @@ /* * ng_ether(4) netgraph node type */ +#include "opt_pfil_hooks.h" +#ifndef PFIL_HOOKS +#error "PFIL_HOOKS is required in your kernel configuration" +#endif #include #include @@ -204,7 +208,7 @@ * Handle a packet through an interface. We get to * look at it here before any upper layer protocols do. */ -static void +static int ng_ether_pfil(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) { const node_p node = IFP2NG(ifp); @@ -224,8 +228,8 @@ break; case PFIL_IN_DISCARD: /* inbound discard */ /* If "orphan" hook not connected, let packet continue */ - if (priv->lower != NULL && priv->lowerOrphan) { - ng_ether_input2(node, &m); + if (priv->lower != NULL && priv->lowerOrphan) + ng_ether_input2(node, mp); break; } return (error); @@ -686,7 +690,7 @@ break; } error = pfil_add_hook(ng_ether_pfil, 0, - PFIL_ALL | PFIL_IN_DISCARD, ðer_pfil_head); + PFIL_ALL | PFIL_IN_DISCARD, ðer_pfil_hook); if (error) break; ng_ether_attach_p = ng_ether_attach; @@ -714,7 +718,7 @@ /* Unregister function hooks */ (void) pfil_remove_hook(ng_ether_pfil, 0, - PFIL_ALL | PFIL_IN_DISCARD, ðer_pfil_head); + PFIL_ALL | PFIL_IN_DISCARD, ðer_pfil_hook); ng_ether_attach_p = NULL; ng_ether_detach_p = NULL; break;