From: sashiko-bot@kernel.org
To: "Hangbin Liu" <hangbin.liu@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v4 4/6] netlink: specs: rt-route: describe lwtunnel IP options
Date: Fri, 09 Oct 2026 08:24:55 +0000 [thread overview]
Message-ID: <sashiko-outbox-165078@kernel.org> (raw)
In-Reply-To: <20261008-ynl_rt_encap-v4-4-4ed2ccf7f949@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] netlink: YNL geneve requests unconditionally rejected due to missing NLA_F_NESTED
--
commit bb8425fa89209355072145c90ad72e3379375b6e
Author: Hangbin Liu <liuhangbin@kylinos.cn>
netlink: specs: rt-route: describe lwtunnel IP options
Replace binary opts in lwtunnel-ip and lwtunnel-ip6 with a nested
lwtunnel-ip-opts set. Add attribute sets for geneve, vxlan, and erspan
IP options to match linux/lwtunnel.h.
> diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
> index dc842a786794a..ea6711292c9b6 100644
> --- a/Documentation/netlink/specs/rt-route.yaml
> +++ b/Documentation/netlink/specs/rt-route.yaml
[ ... ]
> @@ -562,6 +564,45 @@ attribute-sets:
> -
> name: link
> type: u32
> + -
> + name: lwtunnel-ip-opts
> + name-prefix: lwtunnel-ip-opts-
> + attributes:
> + -
> + name: geneve
> + type: binary
[Severity: Medium]
Even though the commit message mentions using binary for Geneve options as a
temporary workaround, will this unconditionally break the request path for YNL
clients?
Because geneve is defined here as type binary, a YNL client will format the
attribute without the NLA_F_NESTED flag. However, the kernel's
ip_opts_policy in net/ipv4/ip_tunnel_core.c strictly defines this attribute
as nested:
[LWTUNNEL_IP_OPTS_GENEVE] = { .type = NLA_NESTED },
When ip_tun_parse_opts() calls nla_validate() with strict validation,
__nla_validate_parse() in lib/nlattr.c rejects the attribute if the
NLA_F_NESTED flag is missing:
if ((pt->type == NLA_NESTED || pt->type == NLA_NESTED_ARRAY) &&
!(nla->nla_type & NLA_F_NESTED)) {
NL_SET_ERR_MSG_ATTR_POL(extack, nla, pt,
"NLA_F_NESTED is missing");
return -EINVAL;
}
Additionally, without multi-attr: true, YNL cannot express multiple
consecutive Geneve options which the kernel expects.
> + -
> + name: vxlan
> + type: nest
> + nested-attributes: lwtunnel-ip-opt-vxlan
> + -
> + name: erspan
> + type: nest
> + nested-attributes: lwtunnel-ip-opt-erspan
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-ynl_rt_encap-v4-0-4ed2ccf7f949@kylinos.cn?part=4
next prev parent reply other threads:[~2026-10-09 8:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 8:24 [PATCH net-next v4 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
2026-10-09 9:06 ` netdev-bot+sashiko
2026-10-09 9:40 ` Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
2026-10-09 9:06 ` netdev-bot+sashiko
2026-10-08 8:24 ` [PATCH net-next v4 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
2026-10-09 8:24 ` sashiko-bot [this message]
2026-10-09 9:07 ` netdev-bot+sashiko
2026-10-09 9:44 ` Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 6/6] netlink: specs: rt-route: describe seg6-local attrs Hangbin Liu
2026-10-09 9:07 ` netdev-bot+sashiko
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=sashiko-outbox-165078@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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.