public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse•de>
To: linux-kernel@vger•kernel.org, stable@kernel•org
Cc: Justin Forbes <jmforbes@linuxtx•org>,
	Zwane Mwaikambo <zwane@arm•linux.org.uk>,
	Theodore Ts'o <tytso@mit•edu>,
	Randy Dunlap <rdunlap@xenotime•net>,
	Dave Jones <davej@redhat•com>,
	Chuck Wolber <chuckw@quantumlinux•com>,
	Chris Wedgwood <reviews@ml•cw.f00f.org>,
	Michael Krufky <mkrufky@linuxtv•org>,
	Chuck Ebbert <cebbert@redhat•com>,
	Domenico Andreoli <cavokz@gmail•com>, Willy Tarreau <w@1wt•eu>,
	Rodrigo Rubira Branco <rbranco@la•checkpoint.com>,
	Jake Edge <jake@lwn•net>, Eugene Teo <eteo@redhat•com>,
	torvalds@linux-foundation•org, akpm@linux-foundation•org,
	alan@lxorguk•ukuu.org.uk, netdev@vger•kernel.org,
	netfilter-devel@vger•kernel.org,
	Patrick McHardy <kaber@trash•net>,
	davem@davemloft•net
Subject: [patch 28/46] netfilter: x_tables: fix match/target revision lookup
Date: Thu, 22 Jan 2009 17:12:31 -0800	[thread overview]
Message-ID: <20090123011231.GC19756@kroah.com> (raw)
In-Reply-To: <20090123011110.GA19756@kroah.com>

[-- Attachment #1: netfilter-x_tables-fix-match-target-revision-lookup.patch --]
[-- Type: text/plain, Size: 1182 bytes --]

2.6.28-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Patrick McHardy <kaber@trash•net>

Upstream commit 656caff:

Commit 55b69e91 (netfilter: implement NFPROTO_UNSPEC as a wildcard
for extensions) broke revision probing for matches and targets that
are registered with NFPROTO_UNSPEC.

Fix by continuing the search on the NFPROTO_UNSPEC list if nothing
is found on the af-specific lists.

Signed-off-by: Patrick McHardy <kaber@trash•net>
Signed-off-by: David S. Miller <davem@davemloft•net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse•de>

---
 net/netfilter/x_tables.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -273,6 +273,10 @@ static int match_revfn(u8 af, const char
 				have_rev = 1;
 		}
 	}
+
+	if (af != NFPROTO_UNSPEC && !have_rev)
+		return match_revfn(NFPROTO_UNSPEC, name, revision, bestp);
+
 	return have_rev;
 }
 
@@ -289,6 +293,10 @@ static int target_revfn(u8 af, const cha
 				have_rev = 1;
 		}
 	}
+
+	if (af != NFPROTO_UNSPEC && !have_rev)
+		return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
+
 	return have_rev;
 }
 


       reply	other threads:[~2009-01-23  1:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090123010651.683741823@mini.kroah.org>
     [not found] ` <20090123011110.GA19756@kroah.com>
2009-01-23  1:12   ` Greg KH [this message]
2009-01-23  1:12   ` [patch 29/46] netfilter: ebtables: fix inversion in match code Greg KH
2009-01-23  1:12   ` [patch 30/46] netfilter: nf_conntrack: fix ICMP/ICMPv6 timeout sysctls on big-endian Greg KH

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=20090123011231.GC19756@kroah.com \
    --to=gregkh@suse$(echo .)de \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=alan@lxorguk$(echo .)ukuu.org.uk \
    --cc=cavokz@gmail$(echo .)com \
    --cc=cebbert@redhat$(echo .)com \
    --cc=chuckw@quantumlinux$(echo .)com \
    --cc=davej@redhat$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eteo@redhat$(echo .)com \
    --cc=jake@lwn$(echo .)net \
    --cc=jmforbes@linuxtx$(echo .)org \
    --cc=kaber@trash$(echo .)net \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=mkrufky@linuxtv$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=rbranco@la$(echo .)checkpoint.com \
    --cc=rdunlap@xenotime$(echo .)net \
    --cc=reviews@ml$(echo .)cw.f00f.org \
    --cc=stable@kernel$(echo .)org \
    --cc=torvalds@linux-foundation$(echo .)org \
    --cc=tytso@mit$(echo .)edu \
    --cc=w@1wt$(echo .)eu \
    --cc=zwane@arm$(echo .)linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox