Skip to contentSkip to conversation

: xt_string: fix negation

PATCH In review Patrick McHardy 2 participants 2 messages Aug 9, 2006 – Aug 10, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 : xt_string: fix negation

Hi Dave,

following are two small netfilter fixes for 2.6.18. Please apply, thanks.

[NETFILTER]: xt_string: fix negation

The xt_string match is broken with ! negation. This resolves a portion of netfilter bugzilla #497.

---
commit 71c55528be7cf1199376a1b1c5489f60bf2b2617
tree 9a3262f5694c8eb859852981536baa874d3b0fab
parent 9f737633e6ee54fc174282d49b2559bd2208391d
author Phil Oester <[email protected]> Tue, 08 Aug 2006 11:09:06 +0200 committer Patrick McHardy <[email protected]> Tue, 08 Aug 2006 11:09:06 +0200

 net/netfilter/xt_string.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/xt_string.c +1 -1
index d8e3891..275330f 100644
@@ -37,7 +37,7 @@ static int match(const struct sk_buff *s
 
 	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)
maintainer
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Wed, 09 Aug 2006 11:41:24 +0200

Quoted 2 lines

following are two small netfilter fixes for 2.6.18. Please apply, thanks.

Both applied, thanks Patrick.