Skip to contentSkip to conversation

string match negation fix

PATCH Applied Phil Oester 2 participants 2 messages Aug 4, 2006 – Aug 8, 2006

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

PATCH 1/1 string match negation fix

The xt_string match is broken with ! negation.

This resolves a portion of netfilter bugzilla #497.

Phil

net/netfilter/xt_string.c +1 -1
@@ -37,7 +37,7 @@
 
 	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)
#1 lore raw
Quoted 3 lines · Phil Oester

The xt_string match is broken with ! negation.

This resolves a portion of netfilter bugzilla #497.

Applied, thanks Phil.