All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net, fw@strlen.de
Subject: Re: [PATCH nft] src: add interface wildcard matching
Date: Sun, 18 Oct 2015 20:33:13 +0200	[thread overview]
Message-ID: <20151018183313.GA4386@breakpoint.cc> (raw)
In-Reply-To: <1445191336-2041-1-git-send-email-pablo@netfilter.org>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Contrary to iptables, we use '*' as wildcard as in udev since the '+' can be
> used as a valid interface name.

'*' can also be part of an interface name, seems only '/', ':', and ' '
(space) are disallowed.

>  # nft --debug=netlink add rule test test iifname eth\*
>  ip test test
>    [ meta load iifname => reg 1 ]
>    [ bitwise reg 1 = (reg=1 & 0x00ffffff 0x00000000 0x00000000 0x00000000 ) ^ 0x00000000 0x00000000 0x00000000 0x00000000 ]
>    [ cmp eq reg 1 0x2a687465 0x00000000 0x00000000 0x00000000 ]

Why do we need a bitwise op for this?

Instead we could just ask for cmp of 3 bytes ('eth' instead of 4 'eth\0')?

You might recall ancient RFC patch for this:
https://patchwork.ozlabs.org/patch/283639/

  reply	other threads:[~2015-10-18 18:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18 18:02 [PATCH nft] src: add interface wildcard matching Pablo Neira Ayuso
2015-10-18 18:33 ` Florian Westphal [this message]
2015-10-18 19:04   ` Patrick McHardy
2015-10-18 19:43     ` Florian Westphal
2015-10-18 20:39       ` Patrick McHardy
2015-10-18 20:14   ` Pablo Neira Ayuso
2015-10-18 20:18     ` Florian Westphal

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=20151018183313.GA4386@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=kaber@trash.net \
    --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.