PERFORCE change 42018 for review
Sam Leffler
sam at FreeBSD.org
Tue Nov 11 11:47:22 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42018
Change 42018 by sam at 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, ð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;
More information about the p4-projects
mailing list