All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [NETFILTER 01/02]: xt_string: fix negation
Date: Wed, 09 Aug 2006 11:41:24 +0200	[thread overview]
Message-ID: <44D9ADC4.1000909@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Hi Dave,

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


[-- Attachment #2: 01.diff --]
[-- Type: text/plain, Size: 1097 bytes --]

[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>

---
commit 71c55528be7cf1199376a1b1c5489f60bf2b2617
tree 9a3262f5694c8eb859852981536baa874d3b0fab
parent 9f737633e6ee54fc174282d49b2559bd2208391d
author Phil Oester <kaber@trash.net> Tue, 08 Aug 2006 11:09:06 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 08 Aug 2006 11:09:06 +0200

 net/netfilter/xt_string.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c
index d8e3891..275330f 100644
--- a/net/netfilter/xt_string.c
+++ b/net/netfilter/xt_string.c
@@ -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)

             reply	other threads:[~2006-08-09  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09  9:41 Patrick McHardy [this message]
2006-08-10 23:57 ` [NETFILTER 01/02]: xt_string: fix negation David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D9ADC4.1000909@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.