From: wenxu <wenxu@ucloud.cn>
To: Pablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>
Cc: 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: Thu, 24 Jan 2019 21:51:27 +0800 [thread overview]
Message-ID: <de38b79c-4e94-16bd-5389-9b0fc224f7eb@ucloud.cn> (raw)
In-Reply-To: <20190118143503.3h2tv4fujl4w25mz@salvia>
Hi all,
Are there any other idear for this patch? Maye should modify IFNAMSIZ to MODULE_NAME_LEN
BR
wenxu
On 2019/1/18 下午10:35, Pablo Neira Ayuso wrote:
> 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.
>
next prev parent reply other threads:[~2019-01-24 13:51 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
2019-01-24 13:51 ` wenxu [this message]
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=de38b79c-4e94-16bd-5389-9b0fc224f7eb@ucloud.cn \
--to=wenxu@ucloud.cn \
--cc=dsahern@gmail.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox