๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1241

Re: [PATCH net-next v10 1/6] netlink: specs: rt-addr: fix the type of target-netnsid

#1241
From: netdev-bot+sashiko
Date: Fri, 09 Oct 2026 11:58
65 lines
8365 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Commit "netlink: specs: rt-addr: fix the type of target-netnsid"
  fixes a real defect in Documentation/netlink/specs/rt-addr.yaml butโ€ฆ

--

netlink: specs: rt-addr: fix the type of target-netnsid

This patch changes the type of the target-netnsid attribute in
rt-addr.yaml from binary to s32. The kernel parses IFA_TARGET_NETNSID
as NLA_S32, and rt-link.yaml already declares its own target-netnsid
as s32.

> The kernel parses IFA_TARGET_NETNSID as NLA_S32 and rt-link.yaml
> declares its target-netnsid as s32, but rt-addr.yaml has it as binary.
>
> Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com>
> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

[Severity: Low]
Should this have a Fixes: tag?

The binary type on target-netnsid goes back to the commit that first
added the spec. A later rename to target-netnsid kept the type as it
was. On the kernel side, IFA_TARGET_NETNSID has always been s32. It
is NLA_S32 in ifa_ipv4_policy in net/ipv4/devinet.c and in the IPv6
policy in net/ipv6/addrconf.c, and it is written with nla_put_s32()
and read with nla_get_s32().

Python YNL is affected on any tree without this fix. When an integer
is passed for target-netnsid, YnlFamily._add_attr() in
tools/net/ynl/pyynl/lib/ynl.py takes the binary branch and raises:

    raise YnlException(f'Unknown type for binary attribute, value: {value}')

Replies that carry the attribute are also decoded as raw bytes, not
as a signed int.

Would something like this be appropriate?

Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")

> diff --git a/Documentation/netlink/specs/rt-addr.yaml b/Documentation/netlink/specs/rt-addr.yaml
> index 0ecbd24c890c..17ead2203451 100644
> --- a/Documentation/netlink/specs/rt-addr.yaml
> +++ b/Documentation/netlink/specs/rt-addr.yaml
> @@ -119,7 +119,7 @@ attribute-sets:
>          type: u32
>        -
>          name: target-netnsid
> -        type: binary
> +        type: s32
>        -
>          name: proto
>          type: u8

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261007115821.11332-1-sigefriedhyy%40gmail.com
Technical Details
Message-ID: <179154712848.434549.1887332518398499959@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343616-linux-kernel-netdev=dewy.ru
References: <20261007115821.11332-2-sigefriedhyy@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343616-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v10 1/6] netlink: specs: rt-addr: fix the type of
 target-netnsid
Date: Fri, 09 Oct 2026 11:58:48 +0000
Organization: Usenet Network
Message-ID: <179154712848.434549.1887332518398499959@kernel.org>
References: <20261007115821.11332-2-sigefriedhyy@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1108518"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:i0OPLu2Q+KNZ1/W3euwGlltuG/Y= sha256:A6BvzlS04ImQMiHy3E409xTIKMt8Q9hZPiImYo42CZY=
	sha1:kQhJ1t1kyWFUGVw3K4rp09xXLcQ= sha256:Wvr0tprDhVSTJorfQDZCFSaB0PpQhPRFPsV4K28tAwM=
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 1327010F6A2; Fri,  9 Oct 2026 16:08:32 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, 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 fo7FQGBfb1GS;
	Fri,  9 Oct 2026 16:08:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343616-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 3AD4610F639; Fri,  9 Oct 2026 16:08:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 9EEA3889EC; Fri,  9 Oct 2026 12:04:55 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A78344E432D;
	Fri,  9 Oct 2026 11:59:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GSxZ0M77"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 967374D2EC6;
	Fri,  9 Oct 2026 11:58:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791547142; cv=none; b=R0AGBcjtXeR09QLR7KdkZIh8SHnR3f/M5sKNZ2CKaz+QYfD/WlZQSkoWZrnMgE9bVhh/ICg4Z7UyEPXJainJZjnr5rnLyGVC1D0vvzUPVKBUzxqPpiAsNRooTtuuMDaTWjsRL5d551pgGMd6RrDI2E9zg7SV0cR5u5yvfcSIbvU=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791547142; c=relaxed/simple;
	bh=v/3a0Lh8ZrHURH8d4p13eZl66IprV2UOGdSkmI/lYyQ=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=ldBHNlZaVomyqIS5kOr+x3viVm9w8S+ooUIK/vC4EfLKwkOE59TmgLLC+biwC3SSL1NKxEq/ZVylBR6KSpMFYsT3UF8P1FMJY4s4dvgb+PEH/Zi6QermhZXzUPryHzTLUzXUTE0njIsadDqRMaxwFRSSvECthmSCG8rChgP+15A=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GSxZ0M77; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E947E1F000FF;
	Fri,  9 Oct 2026 11:58:48 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1791547130;
	bh=30ssU5210HbC7M47rvuGzutQ0pbZYYtm6BCtAsC5o+Q=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=GSxZ0M77V20rQv8FlI7Pe8kSXhM69uiUEQoFca6t4eOJkmfu6SjPXilkhcEBM6eQ3
	 nWESW/VuJEw5HkK3Z9+OsRtnXj9AzMJDeJCLRCbHKDgFOffOuPLDeIpKqDSYT8KknH
	 mm3xJCA7JO3Ae+QOckzXFy2zLorunoewXIMXzuK84Qtoh7mhF943FvvdRy3Qet4oKv
	 PPWTdPxCjM+i+NYUbi/9WOVLrtDyPiq8k2dVB2zedfKq6wUDwEqVgjPKCvrX2vsHO2
	 P84KQn4ujO17K5+tknd7ZenjYusu/8xUYEZa5iw3GxyZyZtZjLbEYBJt/q2JD/HFzs
	 HndlaOeDLciUQ==
X-Cc: ajay.kathat@microchip.com, aleksandr.loktionov@intel.com,
 andrew+netdev@lunn.ch, claudiu.beznea@tuxon.dev, davem@davemloft.net,
 dsahern@kernel.org, donald.hunter@gmail.com, edumazet@google.com,
 idosch@nvidia.com, jacob.e.keller@intel.com, kuba@kernel.org,
 johannes@sipsolutions.net, kees@kernel.org, kory.maincent@bootlin.com,
 kuniyu@google.com, nicolas.dichtel@6wind.com, nickgarlis@gmail.com,
 pabeni@redhat.com, sd@queasysnail.net, shuah@kernel.org, horms@kernel.org,
 sdf.kernel@gmail.com, vadim.fedorenko@linux.dev, willemb@google.com,
 linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
 linux-wireless@vger.kernel.org, netdev@vger.kernel.org
X-In-Reply-To: <20261007115821.11332-2-sigefriedhyy@gmail.com>
X-sashiko-severity: Low
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>