๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7806

Re: [PATCH net] net: bridge: netlink: do not clear the vlan info dump error

#7806
From: Eric Dumazet
Date: Tue, 27 Oct 2026 09:09
30 lines
10157 bytes
Le mar. 27 oct. 2026 ร  09:52, Linkui Xiao <xiaolinkui@126.com> a รฉcrit :
>
> From: Linkui Xiao <xiaolinkui@kylinos.cn>
>
> br_fill_ifinfo() assigns the result of br_fill_vlan_tunnel_info() over
> the result of br_fill_ifvlaninfo() or br_fill_ifvlaninfo_compressed()
> instead of only running the second helper when the first one succeeded.
>
> When the vlan information no longer fits in the skb but the port has no
> vlan mapped to a tunnel dst, br_fill_vlan_tunnel_info() walks the vlan
> list and returns 0 without touching the skb. The -EMSGSIZE is lost,
> br_fill_ifinfo() completes a message whose IFLA_AF_SPEC is truncated,
> and the dump carries on to the next interface instead of stopping, so
> userspace silently sees an incomplete vlan list.
>
> Only fill the tunnel information when the vlan information was filled
> successfully.
>
> This was flagged as a pre-existing issue in the Sashiko review of the
> net-next series, which noted that the VLAN fill result is overwritten
> before it is tested (see the Link tag below).
>
> Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support")
> Link: https://lore.kernel.org/bridge/ed1de95e-e112-4076-93f0-6f7668e657ad@blackwall.org/T/#u#5
> Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn>

Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Technical Details
Message-ID: <CAL4WiioJcbB9gB7tbBcwLdRUPG=zX-5B-7G5=oMXGiy=f_WLSg@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352306-linux-kernel-netdev=dewy.ru
References: <20261027085200.1501599-1-xiaolinkui@126.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-352306-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: bridge: netlink: do not clear the vlan info dump error
Date: Tue, 27 Oct 2026 10:09:16 +0100
Organization: Usenet Network
Message-ID: <CAL4WiioJcbB9gB7tbBcwLdRUPG=zX-5B-7G5=oMXGiy=f_WLSg@mail.gmail.com>
References: <20261027085200.1501599-1-xiaolinkui@126.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1499706"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IIDSHBShBgWy2zZzsYqQfiM8YVY= sha256:lH+LGaG1+4aJsalR77yj89ZutXgmV3ZvcSWabJ1rzcY=
	sha1:zZw3HIJipAsbXcrDlpenPd++xhE= sha256:o8uVGEUsdHlJTqOQZLB0e5UKlmt5TTaFLp4mcfRwr78=
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 16CB4125BE6; Tue, 27 Oct 2026 12:10:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, 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] 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 ufLagr9JF-tJ;
	Tue, 27 Oct 2026 12:10:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352306-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 88321125BDE; Tue, 27 Oct 2026 12:10:41 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CF3B42B1CC; Tue, 27 Oct 2026 09:09:32 +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=1793092172;
	b=y53E685a9GY2qm7TDVws/AG29YAG4dIB73oatsplrgTbepLdPXr2SvZKYcyaG4NcuFyf
	 zxYs+XyQ7/XEUMv2QWliFUsFzlelFTvSsUyQkE8lA4FEhm9t4g4T+0WflNDJB/t/lxRaX
	 MJA3JW49EDe9EGrwI/4YYdjOkqAT0pxP7gJ3p16xumB0Z77+hAymqiW5/hRQnOKVmMpjC
	 pGsqv8uIRupJ2j7NHXB09WKwqqX97a7fRyE1XEpT+TWjAnrRQwUnd+TotJi3KEITdRVQx
	 9xxh2dsmR707n1YudxCVtvR5xkn9j9Rt9kHPUg4dDeD2u87608hh7i38hxtxz0TEGbA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793092172;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=VT3Y5OvSFbO9QB1vLrL/JDIAFG6W923q7UqKoS0saRw=;
	b=wNy1H/UqeH78V5nP7yddwiMWrA2ys+kIYfMZAoSw+b642qKTOuM6Ba+nfoZVmZmlb59a
	 S7gxgB4qRtti2VoQMy2ornkGNEBo/7+5FQop+tnBl7Zq5jesbmaJ4u5y8ZNLipecf4OEG
	 SDTEAJdwWYo1gTBzkMVVReAklA0zARH7M0BIarvhuoNAunXAFdFIysXhzq7BWMuERp0/M
	 9bYcwtXqOwyOyEkh8nosJLMhudrNRIuG+wh8a5b86IpHEh9+WBZKYJwM6u3iasKpkdANb
	 4YlafHxSrnkcb8QBmnw/vB8rAmgFwJqlUiZtf7Wn8g7o4DyYRkfX+IUefzYWF2/2Q5Q==
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=gL6g0cDE;
	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 4C34C606A31A;
	Tue, 27 Oct 2026 09:09:32 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gL6g0cDE
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=1793092171;
	b=vWviR6h/5rlcaOFVy1VB91tyVNpJVyfBbGtwAg41dPrqjwkgroPhIfxSOzvygKsSB8G4
	 2hx8Scoiyw86urdzy/rai88499kpbd5tMeGLj+a0qzNOcepwHCuz5LtXdwc+qLQ732+OV
	 Ym54d/XVz9LXKheJeZvPU0TKlzNaEyOFiPIj6P00F2H6qZ6YRAbfj2MglOAtK8Kd0BKS2
	 x3sewnHBYMWhdG+06//Mj/Wq7A+DoPJdmNFtAiRju7/iA73vOFOwfLHFR6oZ9GoYCZBGB
	 Y00pUcaU5GzquN1WrapaCwTUFfFJ1hh6Oqu7dvaZ/PLZT5w7f/GYXvXqqz67ZXChFWA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793092171;
	h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
	 X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
	 From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
	 Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=VT3Y5OvSFbO9QB1vLrL/JDIAFG6W923q7UqKoS0saRw=;
	b=yY1SD7KENbEsXvDi+abVSOGdFQb8vPvVo396VSYKrdjvjTxHzSKp/Cojj3WLJ2DKmVcm
	 d2ZlGo7pl3HzFmHK7jAWE1vMG6Y1ctRlfdMGn9xKmNHYLyG0jdOTW1OVVvcGVdHk7UHHw
	 WF03XMw4lumoIr2BFNGCDRfJnOhP0fkXmpjI40Pxz1qSnX0kZaVRjOCtz/Tzf6AV5C+Ny
	 1bAHI3o7xFLhZgpDzD9+ACWs8bPCxbahp1Vt4wQSkUTDPwv2GbiV+37xjbwVQ1MPptFve
	 tPT9qE/SCYatCwy5t07WxxwISxPDQn88blke30fumt3YtM1tB7VNsaMAzMf3Sjjy/6Q==
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=gL6g0cDE;
	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 E3785606A321
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 09:09:30 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 692E71F031E5
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 09:09:30 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793092170;
	bh=VT3Y5OvSFbO9QB1vLrL/JDIAFG6W923q7UqKoS0saRw=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=gL6g0cDE/fM1YcljoA1aZnBkluyETfSVdCPCFznt39+S1LfqX3W7PXafW2wNDlgYC
	 Hu+y4trakWqb+ewn7BqriCAIhkt0cawB9tPQ21k4vGD12sliSPExBxINuJxv2rQotr
	 vNDOCC/e1xCvkCGiWU8EzPqlORFljrhhZ2/AIe1AqHBZgJ2kp8cv2NPWpscdff3UUQ
	 vA8WqiGKhwBKQUj4QIKqzNunDhvnOAIJ4Kl6wTo1DiCt6gDREEwwCyQKCJkGGfTZpw
	 EBg/NC6iNMSupxIDQeZ2UmHxXbGEwAfzhWo5W6tsOVBigBCnOwL+4lY/WSBItmSvb3
	 AO3lKl6893s+Q==
X-Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-3ab07d956f2so25436671fa.0
        for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 02:09:30 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AKwUvByZthv0QSqvWT8hoGyz9mgDezKKDx4c4HjadoGKmw7BPCaBTP/ifSdjsDy1QBO2nT832x87QAE=@vger.kernel.org
X-Gm-Message-State: AFq9FYJyrAHT3zCB9jzM/ltOFWmrSdq2gg5mXqFUQumiMOgf5+gKiLPg
	mLZUtuEHSkST+XvJBHTkE9S31zOxt4NhPpWG2tpCqcNTAZCKsDnHeK9lgh91z15SZSn3EMxZqrw
	wFaIiEcNW516wDinT7lLmfMIryDuHHZ4=
X-Received: by 2002:a05:651c:1444:b0:3ab:5423:dd80 with SMTP id
 38308e7fff4ca-3ac6fce6af2mr24493581fa.9.1793092169187; Tue, 27 Oct 2026
 02:09:29 -0700 (PDT)
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
X-In-Reply-To: <20261027085200.1501599-1-xiaolinkui@126.com>
X-Gmail-Original-Message-ID: <CAL4WiioJcbB9gB7tbBcwLdRUPG=zX-5B-7G5=oMXGiy=f_WLSg@mail.gmail.com>
X-Gm-Features: AclHuK8EVwFrXUj1qFMsxab1jfMHpLxrzYP4DKEcT8xEm71gKtZLAmqWJRAV0jE
X-Cc: razor@blackwall.org, idosch@nvidia.com, davem@davemloft.net, 
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, bridge@lists.linux.dev, 
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 
	Linkui Xiao <xiaolinkui@kylinos.cn>