summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2011-04-12 15:20:34 +0000
committerae <ae@FreeBSD.org>2011-04-12 15:20:34 +0000
commit950052527144e021e5ec554f34e6d896942517a5 (patch)
tree2f2c0971b60ea2dbb108c6b47f1efb4cb5ce9566 /sys/netinet
parentab20ea28a3e4a819d42d754ba58701821a4e86bb (diff)
downloadFreeBSD-src-950052527144e021e5ec554f34e6d896942517a5.zip
FreeBSD-src-950052527144e021e5ec554f34e6d896942517a5.tar.gz
Restore previous behaviour - always match rule when we doing tagging,
even when tag is already exists. Reported by: Vadim Goncharov MFC after: 1 week
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipfw/ip_fw2.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c
index c4adff5..c8deb89 100644
--- a/sys/netinet/ipfw/ip_fw2.c
+++ b/sys/netinet/ipfw/ip_fw2.c
@@ -1793,10 +1793,13 @@ do { \
if (mtag != NULL)
m_tag_delete(m, mtag);
match = 0;
- } else if (mtag == NULL) {
- if ((mtag = m_tag_alloc(MTAG_IPFW,
- tag, 0, M_NOWAIT)) != NULL)
- m_tag_prepend(m, mtag);
+ } else {
+ if (mtag == NULL) {
+ mtag = m_tag_alloc( MTAG_IPFW,
+ tag, 0, M_NOWAIT);
+ if (mtag != NULL)
+ m_tag_prepend(m, mtag);
+ }
match = 1;
}
break;
OpenPOWER on IntegriCloud