Skip to content

Commit

Permalink
[NETFILTER]: xt_string: fix negation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phil Oester authored and David S. Miller committed Aug 14, 2006
1 parent 18b6fe6 commit 97c802a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 97c802a

Please sign in to comment.