summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/ipfw/ip_fw_pfil.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-05 15:52:27 -0200
committerRenato Botelho <renato@netgate.com>2016-12-05 15:52:27 -0200
commitec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d (patch)
treed7d40ac77bda3d6fc35814a1a6484eb324b3c7df /sys/netpfil/ipfw/ip_fw_pfil.c
parentca825f0a56d174ca9d3478d87cdca9f318a50cc6 (diff)
parent356fbc072920d7e71c42b310d6bfa2d1a3d36f9f (diff)
downloadFreeBSD-src-ec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d.zip
FreeBSD-src-ec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sys/netpfil/ipfw/ip_fw_pfil.c')
-rw-r--r--sys/netpfil/ipfw/ip_fw_pfil.c13
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 d26cb45..efdc1f5 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 */
OpenPOWER on IntegriCloud