diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2017-01-05 10:04:57 -0600 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-07-17 21:46:04 -0500 |
commit | 4d41b1d2f5d1b27e2e2cd93e82e59161919f1694 (patch) | |
tree | 9e280b01c8c86214390f330156d643500ea458d5 | |
parent | 0cb4ca23471654a154f33db0ac419f8d37fc8cf8 (diff) | |
download | FreeBSD-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.c | 4 |
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); } |