Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 11:47:21 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 42018 for review
Message-ID:  <200311111947.hABJlLM5080647@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/param.h>
 #include <sys/systm.h>
@@ -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, &ether_pfil_head);
+			PFIL_ALL | PFIL_IN_DISCARD, &ether_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, &ether_pfil_head);
+			PFIL_ALL | PFIL_IN_DISCARD, &ether_pfil_hook);
 		ng_ether_attach_p = NULL;
 		ng_ether_detach_p = NULL;
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311111947.hABJlLM5080647>