🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25283

Re: [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes

#25283
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 13:10
120 lines
11911 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The commit says "The kernel accepts more attributes in an
  RTM_DELNEIGH request than the spec lists", but the patch only closes…

--

netlink: specs: rt-neigh: Extend the delneigh request attributes

This patch adds lladdr, vlan, ndm-state-mask and ndm-flags-mask to the
delneigh request attributes in the rt-neigh spec. The kernel uses them
for FDB deletion and NLM_F_BULK filtering, and with them in the spec
these requests can be built through YNL.

> diff --git a/Documentation/netlink/specs/rt-neigh.yaml b/Documentation/netlink/specs/rt-neigh.yaml
> index 7929e667cc7a6..4dd4e3d997f09 100644
> --- a/Documentation/netlink/specs/rt-neigh.yaml
> +++ b/Documentation/netlink/specs/rt-neigh.yaml
> @@ -380,7 +380,11 @@ operations:
>            value: 29
>            attributes:
>              - dst
> +            - lladdr
> +            - vlan
>              - ifindex
> +            - ndm-state-mask
> +            - ndm-flags-mask

[Severity: Medium]
The commit message says:

  "The kernel accepts more attributes in an RTM_DELNEIGH request than the
  spec lists."

Should port, vni, src-vni and nh-id be added to this list too? This
patch covers what the bridge driver reads. The VXLAN driver, which
RTM_DELNEIGH also reaches, reads four more attributes from the delete
request.

For a single-entry delete, rtnl_fdb_del()->vxlan_fdb_delete()->
vxlan_fdb_parse() reads all four:

drivers/net/vxlan/vxlan_core.c:vxlan_fdb_parse() {
    ...
	if (tb[NDA_NH_ID] &&
	    (tb[NDA_DST] || tb[NDA_VNI] || tb[NDA_IFINDEX] || tb[NDA_PORT])) {
    ...
	if (tb[NDA_PORT]) {
		if (nla_len(tb[NDA_PORT]) != sizeof(__be16)) {
    ...
		*port = nla_get_be16(tb[NDA_PORT]);
    ...
	if (tb[NDA_VNI]) {
    ...
	if (tb[NDA_SRC_VNI]) {
    ...
	*nhid = nla_get_u32_default(tb[NDA_NH_ID], 0);
    ...
}

For NLM_F_BULK, vxlan_del_bulk_policy accepts these four attributes
alongside the two mask attributes added here:

	[NDA_SRC_VNI]   = { .type = NLA_U32 },
	[NDA_NH_ID]	= { .type = NLA_U32 },
	[NDA_VNI]	= { .type = NLA_U32 },
	[NDA_PORT]	= { .type = NLA_U16 },

vxlan_fdb_delete_bulk() then uses all of them as flush filters:

drivers/net/vxlan/vxlan_core.c:vxlan_fdb_delete_bulk() {
    ...
	if (tb[NDA_SRC_VNI])
		desc.src_vni = cpu_to_be32(nla_get_u32(tb[NDA_SRC_VNI]));

	if (tb[NDA_NH_ID])
		desc.nhid = nla_get_u32(tb[NDA_NH_ID]);

	if (tb[NDA_VNI])
		desc.vni = cpu_to_be32(nla_get_u32(tb[NDA_VNI]));

	if (tb[NDA_PORT])
		desc.port = nla_get_be16(tb[NDA_PORT]);
    ...
}

rt-neigh is built by the C YNL code generator. Without these four
attributes in the list, the generated delneigh request has no fields
for them. That means a C YNL user can't build any of these requests:

- the equivalent of "bridge fdb del ... dev vxlan0 dst X port Y vni Z"
- a delete scoped to a src-vni
- a delete based on nh-id
- a VXLAN flush filtered by vni, port, src-vni or nh-id

Python YNL is not affected, because it encodes against the attribute
set rather than the per-op request list.

All four attributes are already defined in the attribute set. Note
that src-vni does not appear in any request list in the spec today.

When adding port, note that the kernel reads it with nla_get_be16(),
while the spec defines port as u16 with no byte-order: big-endian.

>      -
>        name: delneigh-ntf
>        doc: Notify a neighbour deletion

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796041491.git.petrm%40nvidia.com
Technical Details
Message-ID: <179613063220.3146.17330272143922251200@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375091-linux-kernel-netdev=dewy.ru
References: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375091-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the
 delneigh request attributes
Date: Tue, 01 Dec 2026 13:10:32 +0000
Organization: Usenet Network
Message-ID: <179613063220.3146.17330272143922251200@kernel.org>
References: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1718486"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tghRjOQNP8C0TvLR6CSU22P/Ssg= sha256:kiKid3v5vLl2Th2jnjFIIbzZaPyFFOcPpb/dnlllWn4=
	sha1:A+K/P064QOMKr6iTpz2AmhbHFgs= sha256:qbsz4fznfkFFPFjVIIjERvJDre8qKdDVzUSLS/b9mYY=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id A60F31173AD; Tue,  1 Dec 2026 16:10:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 0psuKRSv5sPt;
	Tue,  1 Dec 2026 16:10:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375091-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id F1B9F1173AE; Tue,  1 Dec 2026 16:10:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 95C18274A4; Tue,  1 Dec 2026 13:10:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796130634;
	b=iBQpqLIj/i6Qgt+npM0KhUe+VYGOTt7plw9A8jekyOX4iRt1May4U+wwMC3+2L6ey53u
	 AutVA++HX9IFggvmTPxIp55Vs+b0ewA4FPsJidiZa9WRfBPvqKbw/DvAcR6/LoPRrF7d2
	 pTE7+KOQnXCBv2dpxssscyYeW2ZQxEQldBecJl8trf/fs7+nrjG0IhY2fNoqeD4WOxSv6
	 u2wiXDogNgEOl1QdpGQ27MYaqecvSiTDcN1duul/5NLkISVnntyLa/LvnAVpPCYNYHMnM
	 HZHyLt0un/B7+KWikWaCN0/gQwwiNmNX3uyklr+0RdypH4GZQExosuD0E21/Vdr2zog==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796130634;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=tome0tFTmwRJ86X+f+530HCXuubx7Ea02O3+p38DRpo=;
	b=ZsEJ/MbaS6uqe9kNogz9Sf6wOpUdn8vBpG56qw/oNZ4YbXlwInDoC7yP2wYAXvp1pBWg
	 H/tvONBCezEPSe13KhoY8V43AhquuIGp+Z5CAUt6BBQyFsCYFtwlxNi+wIWibpBmReizl
	 cvN0SchMNlhbu6TKgXVxNuXtjveuf5+hhRLjzhmqV54WogrovvrB3E5wIy7pOsRnMKk/A
	 Vdnq/IO8qEu/Py41/v3b7t+ziPWKwnlBkdSnE1Ge+Ap7INwGzmUKBDt+cDgyuKdVU5CyO
	 oWa5HjCXHqHExwmNZm7lrv2dHaMSWXKJ7NulPI9iF1RQl24hTLu1evOX+RIzYNWNiKA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="hIS/u1Dk";
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id B81F3606A683;
	Tue,  1 Dec 2026 13:10:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hIS/u1Dk
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796130633;
	b=yiqekPfF5H8UD2mKVlkuweATnbInpOVQ2MaiM8nUDVeg+n8Bl/V/KJQnTzXwSqP9rh1t
	 j73YlsObIkdYpNj0xAlx0hwIKioAPbNpiFxAX66LKEusvdCFlCSOck8vCX1yOvUHgxxbw
	 0NpdswaoEtnLF3Pfrw2dyWtcVlsWQ8cXsLkHRqAzP49cCDn4zS0GEkHZkhpHa0qSQLo2H
	 qOaDRrGyVPSDjfN0Obmik/4mtm6PGMt4OXRlBknGtXVaxIllAn96TKRnl4imR+f829rtg
	 +ImzqtlUrnorawSiaWZX5fcaXpFMweKYmFG8NCks/1vTldczMHol9bzNHeT6S7iK0VA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796130633;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=tome0tFTmwRJ86X+f+530HCXuubx7Ea02O3+p38DRpo=;
	b=JTKNlg425b9ScxRDkXHdtbBXZa0UXRL/a0w3jb7MkOL1gn3nDyEvoDpqnGQVe1E+Za86
	 n/T6qIkop3ddGLsWEff4tEFhnv29HXIgJ83HLbbH46iEyR/I2VYoQwBfjGLqOFu9kWcZV
	 L4f+ZhWdfE9kAZMo0PjOnLYdRQ9oFptY+u56cJaIexrsEME2AVBXZCzFVCPe5zbXld9oH
	 LqsiKaNJ0XlIWSeGmEuqV9eGCx2JyNLj9Ck8KOhh3Q90QNEkEwDj15HhHEMXnDpriGRJc
	 TAhkpalJoHlDTmxg+2K2ZJVER8EZ2XgfMek8aF5ESHMo8aNAlGzHOCH0BDEs5JzYRmg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="hIS/u1Dk";
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA24F606A33D;
	Tue,  1 Dec 2026 13:10:33 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 983DB1F00932;
	Tue,  1 Dec 2026 13:10:32 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796130633;
	bh=tome0tFTmwRJ86X+f+530HCXuubx7Ea02O3+p38DRpo=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=hIS/u1Dk+zxY8b3oKvnd+LJe//6Z4XZnjgPp0+FenhT8psK+G+Q151Ipp726i1Oir
	 n8CYphaSqyM9CDy+d3MumcYjXlyXM3Tp+wulvtke7pKf3cPFkbFq73Hox1zrIqlQPz
	 lIe7JwC0cgmJr+lGP9dtqrSpqNq/xEnmMUT4u0/f9oXUBuyPNBdrGWxI1zjfJV2T7V
	 vOC3ABqYGBBXlvH0jzoBYuoPuuh0IL5a/k8l01Ucu0QULnmHvpKZsEklWHZCJEWkQj
	 L592MeF5M7ekSZh2rWWahHX/iezp4w8PsBQq6XC2I6aKjEIpe+XE45uOOvonqyZiZ9
	 yvnHNRkIit4Uw==
X-Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
 pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
 andrew+netdev@lunn.ch, razor@blackwall.org, bridge@lists.linux.dev,
 idosch@nvidia.com, aroulin@nvidia.com, mlxsw@nvidia.com, shuah@kernel.org,
 linux-kselftest@vger.kernel.org
X-In-Reply-To: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list