Netdev List
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: wenxu@ucloud.cn, fw@strlen.de, 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:32:08 +0100	[thread overview]
Message-ID: <20190118143208.42q5ifmidcvtphtt@breakpoint.cc> (raw)
In-Reply-To: <20190118142430.rsnru4hyrbsodobf@salvia>

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.).

If you think its too generic, ok.

  parent reply	other threads:[~2019-01-18 14:32 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 [this message]
2019-01-18 14:35     ` Pablo Neira Ayuso
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=20190118143208.42q5ifmidcvtphtt@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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