From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [iptables PATCH 4/7] nft: Fix match generator for '! -i +'
Date: Fri, 9 Dec 2022 01:25:38 +0100 [thread overview]
Message-ID: <Y5KAgpGecTATJywI@orbyte.nwl.cc> (raw)
In-Reply-To: <Y5JJvFOVLNO0LE2B@salvia>
On Thu, Dec 08, 2022 at 09:31:56PM +0100, Pablo Neira Ayuso wrote:
> On Thu, Dec 08, 2022 at 02:19:46PM +0100, Phil Sutter wrote:
> > On Thu, Dec 08, 2022 at 01:23:56PM +0100, Pablo Neira Ayuso wrote:
> > > On Thu, Dec 01, 2022 at 05:39:13PM +0100, Phil Sutter wrote:
> > > > It's actually nonsense since it will never match, but iptables accepts
> > > > it and the resulting nftables rule must behave identically. Reuse the
> > > > solution implemented into xtables-translate (by commit e179e87a1179e)
> > > > and turn the above match into 'iifname INVAL/D'.
> > >
> > > Maybe starting bailing out in iptables-nft when ! -i + is used at
> > > ruleset load time?
> > >
> > > As you mentioned, this rule is really useless / never matching.
> >
> > Are you fine with doing it in legacy, too?
>
> Have you seen any autogenerated ruleset using this silly ! -i + that
> might easily break? Or you are just being conservative while keeping
> this around?
The latter: I was fixing for '-i +' which is legal in iptables but
'iifname "*"' in nftables is not and I also had to find a way to
translate it correctly if inverted.
In theory neither '-i +' nor '! -i +' make sense, from my perspective we
could reject both. Or only the latter since it seems even more bogus
than the former.
I was asking about legacy because I really think we should not change
iptables-nft in a way we wouldn't with legacy. At least rejecting
rulesets which worked fine with legacy is a no go.
Cheers, Phil
next prev parent reply other threads:[~2022-12-09 0:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 16:39 [iptables PATCH 0/7] tests: xlate: generic.txlate to pass replay test Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 1/7] ebtables: Implement --check command Phil Sutter
2022-12-08 21:40 ` Pablo Neira Ayuso
2022-12-09 0:41 ` Phil Sutter
2022-12-09 15:23 ` Pablo Neira Ayuso
2022-12-09 16:51 ` Phil Sutter
2022-12-09 20:09 ` Pablo Neira Ayuso
2022-12-01 16:39 ` [iptables PATCH 2/7] tests: xlate: Use --check to verify replay Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 3/7] nft: Fix for comparing ifname matches against nft-generated ones Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 4/7] nft: Fix match generator for '! -i +' Phil Sutter
2022-12-08 12:23 ` Pablo Neira Ayuso
2022-12-08 13:19 ` Phil Sutter
2022-12-08 20:31 ` Pablo Neira Ayuso
2022-12-09 0:25 ` Phil Sutter [this message]
2022-12-01 16:39 ` [iptables PATCH 5/7] nft: Recognize INVAL/D interface name Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 6/7] xtables-translate: Fix for interfaces with asterisk mid-string Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 7/7] ebtables: Fix MAC address match translation Phil Sutter
2022-12-02 0:46 ` [iptables PATCH 0/7] tests: xlate: generic.txlate to pass replay test Phil Sutter
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=Y5KAgpGecTATJywI@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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.