summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2006-08-13 18:05:35 -0700
committerDavid S. Miller <davem@davemloft.net>2006-08-13 18:05:35 -0700
commit97c802a113989800430a981b6f36b14c62163d37 (patch)
tree92dad3b2bb31469531c6a6f2c8bc2a3bba2f861a /net
parent18b6fe64d4d1f6e0a2c71429a5e5074f43e29203 (diff)
downloadlinux-97c802a113989800430a981b6f36b14c62163d37.tar.bz2
[NETFILTER]: xt_string: fix negation
The xt_string match is broken with ! negation. This resolves a portion of netfilter bugzilla #497. Signed-off-by: Phil Oester <kernel@linuxace.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c
index d8e3891b5f8b..275330fcdaaa 100644
--- a/net/netfilter/xt_string.c
+++ b/net/netfilter/xt_string.c
@@ -37,7 +37,7 @@ static int match(const struct sk_buff *skb,
return (skb_find_text((struct sk_buff *)skb, conf->from_offset,
conf->to_offset, conf->config, &state)
- != UINT_MAX) && !conf->invert;
+ != UINT_MAX) ^ conf->invert;
}
#define STRING_TEXT_PRIV(m) ((struct xt_string_info *) m)