From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH] ebtables: Fix among match
Date: Wed, 28 Sep 2022 17:24:49 +0200 [thread overview]
Message-ID: <20220928152449.GL12777@breakpoint.cc> (raw)
In-Reply-To: <20220928135524.22822-1-phil@nwl.cc>
Phil Sutter <phil@nwl.cc> wrote:
> Fixed commit broke among match in two ways:
>
> 1) The two lookup sizes are 12 and 6, not 12 and 4 - among supports
> either ether+IP or ether only, not IP only.
>
> 2) Adding two to sreg_count to get the second register is too simple: It
> works only for four byte regs, not the 16 byte ones. The first
> register is always a 16 byte one, though.
>
> Fixing (1) is trivial, fix (2) by introduction of nft_get_next_reg()
> doing the right thing. For consistency, use it for among match creation,
> too.
LGTM, thanks.
Could you add a followup patch that cleans this up:
> diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c
> index 659c5b58ba633..596dfdf8991f1 100644
> --- a/iptables/nft-bridge.c
> +++ b/iptables/nft-bridge.c
> @@ -349,7 +349,7 @@ static int lookup_analyze_payloads(struct nft_xt_ctx *ctx,
> return -1;
> }
>
> - sreg_count += 2;
> + sreg_count = nft_get_next_reg(sreg_count, ETH_ALEN);
.. and renames sreg_count to 'enum nft_registers sreg' or similar?
prev parent reply other threads:[~2022-09-28 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 13:55 [iptables PATCH] ebtables: Fix among match Phil Sutter
2022-09-28 15:24 ` Florian Westphal [this message]
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=20220928152449.GL12777@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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.