summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2017-01-05 10:04:57 -0600
committerLuiz Souza <luiz@netgate.com>2017-07-17 21:46:04 -0500
commit4d41b1d2f5d1b27e2e2cd93e82e59161919f1694 (patch)
tree9e280b01c8c86214390f330156d643500ea458d5
parent0cb4ca23471654a154f33db0ac419f8d37fc8cf8 (diff)
downloadFreeBSD-src-4d41b1d2f5d1b27e2e2cd93e82e59161919f1694.zip
FreeBSD-src-4d41b1d2f5d1b27e2e2cd93e82e59161919f1694.tar.gz
Always remove the correct tag, find it by its cookie instead of relying on m_tag_first() to do the right thing.
Ticket #7050 (cherry picked from commit 3eb3c59dd40ec6da4e6c3f46946fdc89ddfb5a11)
-rw-r--r--sys/netpfil/pf/pf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index ecb86a6..06b67bb 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -6499,7 +6499,9 @@ done:
return (action);
}
/* This is dummynet fast io processing */
- m_tag_delete(*m0, m_tag_first(*m0));
+ ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL);
+ if (ipfwtag != NULL)
+ m_tag_delete(*m0, ipfwtag);
if (s != NULL && s->nat_rule.ptr)
PACKET_REDO_NAT(m, &pd, off, s, dir);
}
OpenPOWER on IntegriCloud