diff options
author | loos <loos@FreeBSD.org> | 2016-11-17 14:32:23 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2016-11-17 14:32:23 +0000 |
commit | 41e01117ba34cca63862da2cd14fc8bade649d1c (patch) | |
tree | b3094b6635800220a58c9c690b10ece705611970 /sys/netpfil/ipfw/ip_fw_pfil.c | |
parent | 0a541f3e198a319d898981bb0296a6b11c1e5cdc (diff) | |
download | FreeBSD-src-41e01117ba34cca63862da2cd14fc8bade649d1c.zip FreeBSD-src-41e01117ba34cca63862da2cd14fc8bade649d1c.tar.gz |
MFC r308237:
Remove the mbuf tag after use (for reinjected packets).
Fixes the packet processing in dummynet l2 rules.
Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)
Diffstat (limited to 'sys/netpfil/ipfw/ip_fw_pfil.c')
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_pfil.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 8d0b69e..4316526 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -315,20 +315,15 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct ip_fw_args args; struct m_tag *mtag; - /* fetch start point from rule, if any */ + /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); if (mtag == NULL) { args.rule.slot = 0; } else { - /* dummynet packet, already partially processed */ - struct ipfw_rule_ref *r; - - /* XXX can we free it after use ? */ - mtag->m_tag_id = PACKET_TAG_NONE; - r = (struct ipfw_rule_ref *)(mtag + 1); - if (r->info & IPFW_ONEPASS) + args.rule = *((struct ipfw_rule_ref *)(mtag+1)); + m_tag_delete(*m0, mtag); + if (args.rule.info & IPFW_ONEPASS) return (0); - args.rule = *r; } /* I need some amt of data to be contiguous */ |