linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Helsley <matthltc@us.ibm.com>
To: Matt Cross <matt.cross@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, netfilter-devel@vger.kernel.org
Subject: [PATCH] ebtables match inverted in 2.6.28? (Was: Re: ebtables match inverted in 2.6.28?)
Date: Wed, 31 Dec 2008 19:16:12 -0800	[thread overview]
Message-ID: <1230779772.29793.31.camel@localhost> (raw)
In-Reply-To: <84ee33570812311400m5492af64n45c645a13fe91c2c@mail.gmail.com>

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.
> 
> The patch at the end of this message fixes the problem, but seems a
> little hacky to me.  Who's the right person to address this?
> 
>     -Matt

I suspect the right place to send this is:
netfilter-devel@vger.kernel.org

The subject line should indicate that you've contributed a patch
otherwise you may not get a quick response (I've modified it
accordingly).

For more on submitting patches you can read
Documentation/SubmittingPatches and Documentation/SubmitChecklist

Cheers,
	-Matt Helsley

> 
> --- linux-2.6.28.orig/net/bridge/netfilter/ebtables.c   2008-12-24
> 18:26:37.000000000 -0500
> +++ linux-2.6.28/net/bridge/netfilter/ebtables.c        2008-12-31
> 16:17:44.000000000 -0500
> @@ -80,7 +80,7 @@
>  {
>         par->match     = m->u.match;
>         par->matchinfo = m->data;
> -       return m->u.match->match(skb, par);
> +       return !m->u.match->match(skb, par);
>  }
> 
>  static inline int ebt_dev_check(char *entry, const struct net_device *device)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


  reply	other threads:[~2009-01-01  3:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 22:00 ebtables match inverted in 2.6.28? Matt Cross
2009-01-01  3:16 ` Matthew Helsley [this message]
2009-01-12  5:14   ` [PATCH] ebtables match inverted in 2.6.28? (Was: Re: ebtables match inverted in 2.6.28?) Patrick McHardy
2009-01-12  7:43     ` Jan Engelhardt
2009-01-12  7:54       ` Patrick McHardy
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=1230779772.29793.31.camel@localhost \
    --to=matthltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.cross@gmail.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).