Netdev List
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: wenxu@ucloud.cn, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v3] netfilter: nft_meta: Add NFT_META_I/OIFKIND meta type
Date: Fri, 18 Jan 2019 15:35:03 +0100	[thread overview]
Message-ID: <20190118143503.3h2tv4fujl4w25mz@salvia> (raw)
In-Reply-To: <20190118143208.42q5ifmidcvtphtt@breakpoint.cc>

On Fri, Jan 18, 2019 at 03:32:08PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > +	case NFT_META_IIFKIND:
> > > +		if (in == NULL || in->rtnl_link_ops == NULL)
> > > +			goto err;
> > > +		strncpy((char *)dest, in->rtnl_link_ops->kind, IFNAMSIZ);
> > 
> > It seems kind can be arbitrarily large, no limitation in its length.
> 
> Its limited to 60 or 56 bytes it seems:
> char kind[MODULE_NAME_LEN];
> 
> nla_strlcpy(kind, linfo[IFLA_INFO_KIND], sizeof(kind));
> 
> (linkinfo_to_kind_ops in rtnetlink.c).
> 
> > Thinking...
> > 
> > There is no other way to identify a vft device rather than this
> > string? The only l3mdev that exists if vrf, right?
> 
> There is, I suggested this more generic approach, as it would allow
> to create rules that match on the kind of device used (vrf, ppp, etc.).

Ah I see.

> If you think its too generic, ok.

I think it's fine, thanks for explaining.

  reply	other threads:[~2019-01-18 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 23:53 [PATCH v3] netfilter: nft_meta: Add NFT_META_I/OIFKIND meta type wenxu
2019-01-18 14:24 ` Pablo Neira Ayuso
2019-01-18 14:27   ` David Ahern
2019-01-18 14:30     ` Pablo Neira Ayuso
2019-01-18 14:32   ` Florian Westphal
2019-01-18 14:35     ` Pablo Neira Ayuso [this message]
2019-01-24 13:51       ` wenxu
2019-01-24 13:59         ` 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=20190118143503.3h2tv4fujl4w25mz@salvia \
    --to=pablo@netfilter.org \
    --cc=dsahern@gmail.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=wenxu@ucloud.cn \
    /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