diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2010-07-01 17:46:12 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2010-07-01 17:46:12 +0000 |
commit | 956000b83852e37f4588fdeb8e1ecff70d4257fe (patch) | |
tree | 45bcbd174ab9b2b12aefcc4b56f437eb72ff13e9 /sys/netgraph/ng_ipfw.c | |
parent | 962cf295258b751f3922e6ca7c998e0c4e784254 (diff) | |
download | src-956000b83852e37f4588fdeb8e1ecff70d4257fe.tar.gz src-956000b83852e37f4588fdeb8e1ecff70d4257fe.zip |
The struct ipfw_rule_ref follows the struct m_tag. Deal with this
correctly. This fixes breakage of ng_ipfw(4) in r201527.
Submitted by: Alexander Zagrebin <alexz visp.ru>
Notes
Notes:
svn path=/head/; revision=209633
Diffstat (limited to 'sys/netgraph/ng_ipfw.c')
-rw-r--r-- | sys/netgraph/ng_ipfw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c index 537040a8ff82..18dd537befe7 100644 --- a/sys/netgraph/ng_ipfw.c +++ b/sys/netgraph/ng_ipfw.c @@ -221,20 +221,21 @@ ng_ipfw_findhook1(node_p node, u_int16_t rulenum) static int ng_ipfw_rcvdata(hook_p hook, item_p item) { - struct ipfw_rule_ref *tag; + struct m_tag *tag; + struct ipfw_rule_ref *r; struct mbuf *m; NGI_GET_M(item, m); NG_FREE_ITEM(item); - tag = (struct ipfw_rule_ref *) - m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (tag == NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; - if (tag->info & IPFW_INFO_IN) { + r = (struct ipfw_rule_ref *)(tag + 1); + if (r->info & IPFW_INFO_IN) { ip_input(m); return (0); } else { |