From: Jakub Kicinski <kuba@kernel.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ip6_tunnel: enable to change proto of fb tunnels
Date: Thu, 19 Jun 2025 15:52:20 -0700 [thread overview]
Message-ID: <20250619155220.3577a32a@kernel.org> (raw)
In-Reply-To: <20250617160126.1093435-1-nicolas.dichtel@6wind.com>
On Tue, 17 Jun 2025 18:01:25 +0200 Nicolas Dichtel wrote:
> + if (dev == ip6n->fb_tnl_dev) {
> + if (!data[IFLA_IPTUN_PROTO]) {
> + NL_SET_ERR_MSG(extack,
> + "Only protocol can be changed for fallback tunnel");
> + return -EINVAL;
> + }
> +
> + ip6_tnl_netlink_parms(data, &p);
> + ip6_tnl0_update(netdev_priv(ip6n->fb_tnl_dev), &p);
> + return 0;
Hm, I guess its in line with old school netlink behavior where we'd
just toss unsupported attributes on the floor. But I wonder whether
it'd be better to explicitly reject other attrs?
Shouldn't be too painful with just one allowed:
if (!data[IFLA_IPTUN_PROTO])
goto ..
ip6_tnl_netlink_parms(data, &p);
data[IFLA_IPTUN_PROTO] = NULL;
if (memchr_inv(data, 0, sizeof() * ARRAY_SIZE(ip6_tnl_policy)))
goto ...
ip6_tnl0_update(netdev_priv(ip6n->fb_tnl_dev), &p);
WDYT?
next prev parent reply other threads:[~2025-06-19 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 16:01 [PATCH net-next] ip6_tunnel: enable to change proto of fb tunnels Nicolas Dichtel
2025-06-19 13:45 ` Simon Horman
2025-06-19 22:52 ` Jakub Kicinski [this message]
2025-06-20 8:14 ` Nicolas Dichtel
2025-06-21 13:54 ` Jakub Kicinski
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=20250619155220.3577a32a@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
/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.