From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: matthltc@us.ibm.com, Matt Cross <matt.cross@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] ebtables match inverted in 2.6.28? (Was: Re: ebtables match inverted in 2.6.28?)
Date: Mon, 12 Jan 2009 08:54:12 +0100 [thread overview]
Message-ID: <496AF724.8060203@trash.net> (raw)
In-Reply-To: <alpine.LSU.2.00.0901120835390.21692@fbirervta.pbzchgretzou.qr>
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Jan Engelhardt wrote:
>>> On Wed, 2008-12-31 at 17:00 -0500, Matt Cross wrote:
>>>> I think the work to move ebtables to use xtables broke ebtables.
>>>> Specifically, in commit 8cc784eec6676b58e7f60419c88179aaa97bf71c the
>>>> return value of the match functions was inverted so that they return 1
>>>> (true) on matches instead of EBT_MATCH (0), and vice versa (look in
>>>> ebt_ip.c). The logic in ebtables.c (ebt_do_table() and
>>>> EBT_MATCH_ITERATE()) expect match functions to return 0 for matches.
>>>>
>> Jan, could you have a look at this please?
>
> That seemds indeed so.
> Patch is both for 2.6.29-running and 2.6.28.
>
> netfilter: ebtables: fix inversion in match code
Applied, thanks. When fixing regressions please state the commit
ID and subject of the patch introducing the breakage and also who
reported it.
Like this.
[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1032 bytes --]
commit c6b52c688ecf03adb82724299b97701528821ca5
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Mon Jan 12 08:52:08 2009 +0100
netfilter: ebtables: fix inversion in match code
Commit 8cc784ee (netfilter: change return types of match functions
for ebtables extensions) broke ebtables matches by inverting the
sense of match/nomatch.
Reported-by: Matt Cross <matthltc@us.ibm.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 8a8743d..820252a 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -79,7 +79,7 @@ static inline int ebt_do_match (struct ebt_entry_match *m,
{
par->match = m->u.match;
par->matchinfo = m->data;
- return m->u.match->match(skb, par);
+ return m->u.match->match(skb, par) ? EBT_MATCH : EBT_NOMATCH;
}
static inline int ebt_dev_check(char *entry, const struct net_device *device)
next prev parent reply other threads:[~2009-01-12 7:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <84ee33570812311400m5492af64n45c645a13fe91c2c@mail.gmail.com>
2009-01-01 3:16 ` [PATCH] ebtables match inverted in 2.6.28? (Was: Re: ebtables match inverted in 2.6.28?) Matthew Helsley
2009-01-12 5:14 ` Patrick McHardy
2009-01-12 7:43 ` Jan Engelhardt
2009-01-12 7:54 ` Patrick McHardy [this message]
2009-01-13 21:20 ` Matt Helsley
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=496AF724.8060203@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.cross@gmail.com \
--cc=matthltc@us.ibm.com \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).