summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ipfw.h
diff options
context:
space:
mode:
authoroleg <oleg@FreeBSD.org>2009-06-09 21:27:11 +0000
committeroleg <oleg@FreeBSD.org>2009-06-09 21:27:11 +0000
commit1980405dfdd449338905e8f38096f7b4e80f7784 (patch)
tree7f52d144f542aa5d755cf5429a93e60617651de6 /sys/netgraph/ng_ipfw.h
parent8fdb55dd4173ed49af8cc002203d5c23e353315e (diff)
downloadFreeBSD-src-1980405dfdd449338905e8f38096f7b4e80f7784.zip
FreeBSD-src-1980405dfdd449338905e8f38096f7b4e80f7784.tar.gz
Close long existed race with net.inet.ip.fw.one_pass = 0:
If packet leaves ipfw to other kernel subsystem (dummynet, netgraph, etc) it carries pointer to matching ipfw rule. If this packet then reinjected back to ipfw, ruleset processing starts from that rule. If rule was deleted meanwhile, due to existed race condition panic was possible (as well as other odd effects like parsing rules in 'reap list'). P.S. this commit changes ABI so userland ipfw related binaries should be recompiled. MFC after: 1 month Tested by: Mikolaj Golub
Diffstat (limited to 'sys/netgraph/ng_ipfw.h')
-rw-r--r--sys/netgraph/ng_ipfw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ipfw.h b/sys/netgraph/ng_ipfw.h
index 5448a38..29039f2 100644
--- a/sys/netgraph/ng_ipfw.h
+++ b/sys/netgraph/ng_ipfw.h
@@ -38,6 +38,8 @@ extern ng_ipfw_input_t *ng_ipfw_input_p;
struct ng_ipfw_tag {
struct m_tag mt; /* tag header */
struct ip_fw *rule; /* matching rule */
+ uint32_t rule_id; /* matching rule id */
+ uint32_t chain_id; /* ruleset id */
struct ifnet *ifp; /* interface, for ip_output */
int dir;
#define NG_IPFW_OUT 0
OpenPOWER on IntegriCloud