Article View: linux.kernel.netdev
Article #14093Re: [PATCH net v2] tcp: fix device binding after failed IPv6 connect
From: Jakub Kicinski
Date: Tue, 10 Nov 2026 18:02
Date: Tue, 10 Nov 2026 18:02
12 lines
8118 bytes
8118 bytes
On Mon, 2 Nov 2026 22:34:52 +0800 Xia Yan wrote: > + if (scope_id_set && > + READ_ONCE(sk->sk_bound_dev_if) == usin->sin6_scope_id) > + WRITE_ONCE(sk->sk_bound_dev_if, old_bound_dev_if); > + scope_id_set = false; Just restore the old_bound_dev_if, I don't think we need all these pre-conditions complicating the code. __ip6_datagram_connect() already restores unconditionally for example. -- pw-bot: cr
Technical Details
Message-ID:
<20261110100224.57cbf548@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360501-linux-kernel-netdev=dewy.ruReferences:
<20261102143352.135769-1-yanxia@cmss.chinamobile.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360501-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] tcp: fix device binding after failed IPv6 connect Date: Tue, 10 Nov 2026 10:02:24 -0800 Organization: Usenet Network Message-ID: <20261110100224.57cbf548@kernel.org> References: <20261102143352.135769-1-yanxia@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="667943"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:2eTW0SAwnmbiX5HspJQtRkJ0cbg= sha256:4RAkT4pz0COEE1/hX8JEbTnU967lHPEM4SJ//eYPFFk= sha1:jhD845lmQ3dFPfLU0nlg1nJGGZk= sha256:gvdWKmD7WkNIHslZNXSqyD4qUwZMlo16WUvmUEA3KKw= 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 B06BF113CA5; Tue, 10 Nov 2026 21:07:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[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] 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 iFfoFV9oi1qh; Tue, 10 Nov 2026 21:07:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-360501-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id CB6DA113CA1; Tue, 10 Nov 2026 21:07:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 9C1BD645B79; Tue, 10 Nov 2026 18:02:47 +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=1794333754; b=24DJHcwFyMLsHlxiFfpAIeV9h1pSwDDEi2AM4Pa8tJgeHDc4sDb7hVCyANa6wJn+AsfG lT7ZLkivcLhj0AN3TZE1p9Q6nrAIEPv4wagnwFitu9BUmJXvxrGCdwprsnoINJrDZDdqR tP3SmGngrjQOudz3uGKp2LDKzBR5nmvJzDD0gp2dFGcvOcf0KagMJ5uNT9439EVdxGcRy JnLQnP8LPSY1zY56zwBwthcINcLPyva+doAhI+x56uw34Ictr4cn07oC7hXKiD62pgQSC jLjQNE5UpKXcY3d35MFH6QLw4MzYaYRbwDFUoLHdWq2Chtj4UeF3oNuVpyiNbJhXQpQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794333754; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=KZM+P45GMMku+OUOrW90NWAj7DSZ8D2oRmj7UZG9ZX0=; b=XNI0j9s5/vfgAvbIwPNPq2IWjd2FAJHJtEAii6zbX6YlbsqBYRV1VqiF4f1KxPe1lyYZ nNeDXuO3VTYvRglPQkcDrzPxtNUGE8TarLbUhPgQ2wgAxEHZO0+R/2JLvHinebLgamV3U uCHKcacLiEOod0YZ/G4dbL7Ong25HFoNtOAIM1S/dOZzmJieWp6Dt+3fimMt0d2gxwjZv TKh5kDej7xpz6AiWZoEoFd5v/8eKcD0L/4AELi6vsBLWOClflREyu2q/MVOOdTyg/3Sia ftrxn4p+RXH21hHRGBycHwSljRqbGdBwbdhDpRXEEP7WtfMjQuKoTTY4cHjhJc0/YnA== 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="Yq/hcIPp"; 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 C5F9C606A335; Tue, 10 Nov 2026 18:02: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=Yq/hcIPp 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=1794333749; b=LZaBdvAT68nKbPzwp9JidSkgQOdIyTFAgeTHQELtFivNeJwgHg1ApnKmu4ubs5Gi8zZb 57buFBo3m7Z01ZGaz3LcnFf883V7KbUVlMhjrM1FHcBEq7Pk4+wOTJ5JLUpmrXEzFWILW 7t6+0rtGRmmSpcu10qBXXMoeVQsPC/0jxH4ZTwmrtX/w9DJkXL/K8bGaYXVpF1AfP1kSz iJfsmw0x6FpGrMzRBE62izJiOHxlUjP9dHFH4yQyboVkxwAJq8CMoeEcEBXyxrUea6BYF k5Hj3j6P0Tnh0KgpU4Cx/Yl62g78kHdroiLkrN1WaFJ0xeJ4qGnhhLtZnQZgmVQBwGQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794333749; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=KZM+P45GMMku+OUOrW90NWAj7DSZ8D2oRmj7UZG9ZX0=; b=fYXPteCpJnGP7iNhl43Mv5jpjdz23bxjorRrBstgfiOkG5t6V/7u0FKwq2yusBlL+YCq iamVGG0hQ/nBg5JtmBUt9O+wd3wCBZty8uI5w13r5igQCNExKPkKBFO4Qqq2V/TWCeuj+ 0zmZyArYEFtK3P9N51CLYH04F+RC/NTZS+ApN/aLKaQRUwWyktcE08ctykZaMSkIRo55h RccKCDDssxgKaezspfdoMAGQxtSYopjmdQU9blYe4bYNh10WskTTMgPWZPpEUZPI7Nqh2 VYHp36uOsyQ7/WFIeJJ5pX761kVgVjiFOtwvbYNxOzp64cELVu9H4VDJi/oxTreINHg== 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="Yq/hcIPp"; 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 A97FC606A334; Tue, 10 Nov 2026 18:02:28 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB62C1F008A2; Tue, 10 Nov 2026 18:02:27 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794333748; bh=KZM+P45GMMku+OUOrW90NWAj7DSZ8D2oRmj7UZG9ZX0=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Yq/hcIPph+w+2zxxSAqfNydltKPCYmgBIfszhb8UZh/i/2l2HfV+2kufbM/v3cjj3 dc4P95/8zKYuOiNVfPI3QnIYyqUPgitunR1guzGMCE37mHtxfJdRzHOTFzmgB4cS+5 dm5jX7GrMealc9WxFXoKoNLPqZR8jw6VJbXrdowVU0rX2kwD4WJZIScQwX7DWAQVaj g5grFyMX+rm3e4Ysjyj0X2hdRcRo/O2IC9Ro6kt6xgt8XBq616KgkPLAfwipJYzbvg L6tVs+CTcdufnIoX88VWmb7Qeoi3jnk9RDxRKS8G2m1xavv3ikAr9JlsanYDmJ80j0 63kMwEy8/t6RA== X-Cc: netdev@vger.kernel.org, edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com, davem@davemloft.net, pabeni@redhat.com, horms@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, yana06070@163.com, netdev-bot+sashiko@kernel.org, jiayuan.chen@linux.dev X-In-Reply-To: <20261102143352.135769-1-yanxia@cmss.chinamobile.com> 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