Date: Mon, 29 Sep 2003 21:30:19 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 38839 for review Message-ID: <200309300430.h8U4UJbh042900@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38839 Change 38839 by sam@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309300430.h8U4UJbh042900>