From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796428142; b=FFsD237eH+i/PzeJtrAPp1N+MGc2MZVGYljN+jXOK5Lm4NaPRx6bEbr8WtD5l67eyauN 0VxuTHotNODCr7SnBXamHfPsg8XkGbWAIWp7MTBVu+CS4O+An2egybW5yzfjBLjvgHNkN g+BCQP3DmL1pHnNQwLZqb+9VxaSUTFQMw1qlieABBHRhmfkQB9JJhBlpag1P+5G9YXIMy uB7opzcaSVu07AVS8DGH85h2ohlL6FmpAKeYHThBVeca/KgE/fIeF5agzXL+D+WiVXnLV uA5NIpVpP6K9r9aBHHer/P/K9DlIs0j6Texmz+m2iszdYevGJP+IY2eOB8YMQnpGTag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796428142; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=MCdcGhBBOFhvsQXXCal8AGmMVmNlLmMdxdh6f+p+RFM=; b=464dJwar7ybCPEMsMIpcNvVz8wGzZQVyLXa3Kg4BslC1c5gPoQMnmN+BgbPYEYHTtc9s EGu4n2ph/d1WEc+GlXiQ6owHlJGknGoJfUvIF8XMCfOR9reQdPCL2RYMQw/iLu/QFCV6u NwLdlhr1QBApc3+IpRXgtztCOFQ1q8qbMOpQpvh2OMRnDJ7Cgx+JMYpHyPvkVDTjHA8ok Ugwx9PYF6fA1+M/3WoA0Iw741gvTH1KmqKKWgueze4JLz1Qpf5XYRaiGS2QtY93oIdylt CsNWSzIRoa2SRqpYcR7ld7TrjdeAB56ffsfUGFECrJYvhL03/8476/LAmKJvZglPnrg== 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=av+whg8r; arc=none smtp.remote-ip=100.103.45.18 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 BF9DA606A322 for ; Fri, 4 Dec 2026 23:49:02 +0000 (UTC) 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=av+whg8r Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44F231F00936; Fri, 4 Dec 2026 23:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796428142; bh=MCdcGhBBOFhvsQXXCal8AGmMVmNlLmMdxdh6f+p+RFM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=av+whg8rg95XpYf8/tKnCKQhab8YB9Y4UZn4r+CMsxv3IsMOcF+ZRAw6yVElE0fkK 2N9A3M4TOf6WARFUg7nGXmEoyy69dmS3oMXOKiuxTAzvGksE825SWWv/6zKkYUBRuG HTkgGkvmQU9Wbs6yv05Y8CqNZo2DaLyCdoN5J4Jx22lTC3k1vTiq3JxItMFB5wJo7t S3f5CMvQ2xp5LIWVPfkDKpPDJh18TObUPyDy1Sh7FIRoI5gaEGufuYhwsuy2un8F5a iiO4yOuJnr2PYu9y3M2hY1EglJSc9jt7aNwV9R+bvpoatBV4J6axhDxgF38MP1G00Y busf62sMn20tw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 1/3] ipv6: Use the selected nexthop for source address selection Reply-To: sashiko-reviews@lists.linux.dev To: "Tim Menninger" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261203234720.2428689-2-tmenninger@everpuredata.com> References: <20261203234720.2428689-1-tmenninger@everpuredata.com> <20261203234720.2428689-2-tmenninger@everpuredata.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 23:49:01 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] ipv6: ip6_route_get_saddr() uses wrong device on local multipath routes -- commit 32b20a077341b7e5f5d4b5cc3861087c45ef1ebf Author: Tim Menninger ipv6: Use the selected nexthop for source address selection This commit passes the selected dst_entry to ip6_route_get_saddr() so that IPv6 source address selection uses the chosen path's device when a route references a multipath nexthop group. > diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h > index 95f936be32c6c..d5754f6442bbf 100644 > --- a/include/net/ip6_route.h > +++ b/include/net/ip6_route.h [ ... ] > @@ -155,8 +156,12 @@ static inline int ip6_route_get_saddr(struct net *ne= t, struct fib6_info *f6i, > rcu_read_lock(); > =20 > l3mdev =3D dev_get_by_index_rcu(net, l3mdev_index); > - if (!f6i || !f6i->fib6_prefsrc.plen || l3mdev) > - dev =3D f6i ? fib6_info_nh_dev(f6i) : NULL; > + if (!f6i || !f6i->fib6_prefsrc.plen || l3mdev) { > + if (dst && f6i && f6i->nh && nexthop_is_multipath(f6i->nh)) > + dev =3D dst_dev_rcu(dst); > + else > + dev =3D f6i ? fib6_info_nh_dev(f6i) : NULL; > + } > same_vrf =3D !l3mdev || l3mdev_master_dev_rcu(dev) =3D=3D l3mdev; > if (f6i && f6i->fib6_prefsrc.plen && same_vrf) > *saddr =3D f6i->fib6_prefsrc.addr; [Severity: Medium] Can dst_dev_rcu(dst) return loopback_dev or a VRF master instead of the selected nexthop device here? Userspace can install an RTN_LOCAL route referencing a multipath nexthop group via RTA_NH_ID. For RTF_LOCAL and RTF_ANYCAST routes, ip6_rt_get_dev_rcu() overrides dst->dev to loopback_dev (or the VRF master for non-strict VRF slave destinations). Passing loopback_dev to ipv6_dev_get_saddr() fails with -EADDRNOTAVAIL for link-local destinations, and prefers loopback over the nexthop interface for global ones. In a VRF, l3mdev_master_dev_rcu(dev) =3D=3D l3mdev also fails, ignoring even an explicit f6i->fib6_prefsrc. Excluding routes with RTF_LOCAL or RTF_ANYCAST set (or using rt6i_idev->dev) would avoid selecting the wrong device. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203234720.2428= 689-1-tmenninger@everpuredata.com?part=3D1