PERFORCE change 38839 for review
Sam Leffler
sam at FreeBSD.org
Mon Sep 29 21:30:21 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38839
Change 38839 by sam at sam_ebb on 2003/09/29 21:30:00
correct pfil_run_hooks handling
Affected files ...
.. //depot/projects/netperf/sys/net/bridge.c#11 edit
Differences ...
==== //depot/projects/netperf/sys/net/bridge.c#11 (text+ko) ====
@@ -1020,13 +1020,11 @@
ip->ip_off = ntohs(ip->ip_off);
if (pfil_run_hooks(&inet_pfil_hook, &m0, src, PFIL_IN) != 0) {
- EH_RESTORE(m0); /* restore Ethernet header */
- return m0;
- }
- if (m0 == NULL) {
- bdg_dropped++;
+ /* NB: hook should consume packet */
return NULL;
}
+ if (m0 == NULL) /* consumed by filter */
+ return m0;
/*
* If we get here, the firewall has passed the pkt, but the mbuf
* pointer might have changed. Restore ip and the fields ntohs()'d.
More information about the p4-projects
mailing list