Article View: linux.kernel.netdev
Article #9680Re: [PATCH net] tcp: fix device binding after failed IPv6 connect
From: Xia Yan
Date: Mon, 02 Nov 2026 14:14
Date: Mon, 02 Nov 2026 14:14
30 lines
9842 bytes
9842 bytes
Hi Jiayuan, > Reverse xmas tree please Done in v2. > inet_bhash2_reset_saddr uses sk_bound_dev_if too. Agreed. v2 restores it before tcp_set_state(TCP_CLOSE) and inet_bhash2_reset_saddr(). I reproduced the bind2 warning with v1 in the VRF test; it's gone with v2. v2 also restores only a scope binding installed by this call and keeps a different binding set by a later callback. It avoids restoring again after the TCP_CLOSE callback. The UML tests cover both VRF cleanup and BPF binding changes; all 39 checks pass with v2. On the asynchronous failures from the bot review: those go through disconnect after tcp_v6_connect() has returned successfully. Retaining the binding there predates v1. Handling it would mean tracking the implicit binding across disconnect; v2 is limited to synchronous connect errors and makes that scope explicit in the commit message. Thanks for the review. I'll send v2 as a separate thread. Best regards, Xia Yan pw-bot: cr
Technical Details
Message-ID:
<20261102141320.129787-1-yanxia@cmss.chinamobile.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-354713-linux-kernel-netdev=dewy.ruReferences:
<20261031074654.73952-1-yanxia@cmss.chinamobile.com> <062d02ca-e9e1-4f4e-ac57-0de27272a205@linux.dev>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-354713-linux-kernel-netdev=dewy.ru From: yanxia@cmss.chinamobile.com (Xia Yan) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] tcp: fix device binding after failed IPv6 connect Date: Mon, 2 Nov 2026 22:14:38 +0800 Organization: Usenet Network Message-ID: <20261102141320.129787-1-yanxia@cmss.chinamobile.com> References: <20261031074654.73952-1-yanxia@cmss.chinamobile.com> <062d02ca-e9e1-4f4e-ac57-0de27272a205@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2947885"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:YIF5j/UDUeLeORitclKwUlEkU/4= sha256:FTJM8ZD1MYzrD2ioTxXLlSkuMJzKl7EQpEoxPQiIv/8= sha1:iDCov2a3iTBjz9qDCLkVVQvKOrw= sha256:qzWewUV6tdgasmBlpidGtWsgjoGCQgawBeN2tY/ceqU= 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 C0A9411253E; Mon, 2 Nov 2026 17:50:40 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.751 X-Spam-Status: No, score=-2.751 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com 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 8YsHvfP4P86M; Mon, 2 Nov 2026 17:50:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-354713-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 61A5011252E; Mon, 2 Nov 2026 17:50:24 +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 8827046A18; Mon, 2 Nov 2026 14:16:39 +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=1793628899; b=zYYCbUWXUkWhQ6IfMLWGadU31QSTzgI1mXIQk6+yjFfONkvfUBHrjJZr73kh9bBbrwPn Zx09SYbHZGyue0fEfBFASQQWFQHqqPjxHFBm32LzfD7AIZKVdbsxOFkxu4Lg+Nih7IwkO j5D/Q2BfR4yhzxiu0iBVS+GPmEU3/MCMWviUw4L1Aj+33cD8iC4h98ykZ4ebN44CdNkV6 XW1Mfl2Tx0X2G/iKxhFE8ZsRxeu+ZaOWLMnPkmSHopLfcMi0y9Si17SJ74ZnLh5N1vlHy v38avZ16PNsHtTH2VRtwBnkPVG1x/RPPhCKjfzTTeh0A0HESkVKSgJU1CbPbM+9NlRA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793628899; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=8+TUm50QUxPlF6kV8aTnHh7tj4ymOgWQczPXKqcsgps=; b=VdtjBB6Uv8qU4wZW10qitHgdOcZSQH8FhEUQ2cr3AXpnj72RfnfhdqzAYduNw2dAIuwG Focune9YlhhDPjUYzhrsh525oj6tHighQ4Ee4H63T72gwJJ2n3LamCX8VqejWskvDr7/X 0dfJpQ39mS/G2LV9c0gELMZmdZAUShM/dt2OydNGaYaymZxs2lqsh4D4WGxGMBP15pLnZ QQLUvybJ9afz//ERhfAuAGQCXxlVqVCH2kU0X+hRlNVs7cObTqsxhNCh50BEwFeOJJlnx ZLxf0OVW2w4Sxzwr9Ossjoa1wIvldyN4zp6W0JbJIqLjc+Dp78/0MlQgH9GCFE3Ox4w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=ycEcgu+s; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; 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 7E47E606B5CC; Mon, 2 Nov 2026 14:14:59 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=ycEcgu+s X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793628898; b=yJfeVQo8PhgmG4Cfbn4GNFZ796pewsmHDYllR+LI/dTOYSlmPQxeQCoUNXZtZ5FI+HjO UnhgCPy4Myxk9avD4NjX6RjDjqDWdiX4IYJ7KxuNxDhiv4ftElOxfWvBRr73fBDG0aKfo sS+6cYmF6mQBwL9AKmHJMs7rVgylDdh4CJhaeEJc34qAGYkMI+1mLYxKazd5Nl/vSFvLs BB4skmZH2hklv0GmJixtMuWy/qzIvgEE6etBqSyDnOack749jMIIklNgLs4UNh5zDsE5H hRpB9lL0iB+BAOeLrj/PuIZO55kh2rqt0ZG8bM57DVLdWgiRAFD786iAWIBUMUzUxeQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793628898; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailer:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=8+TUm50QUxPlF6kV8aTnHh7tj4ymOgWQczPXKqcsgps=; b=Npl+0E7eQTVkB86k3mXvcNih27cv/dvFc9fy8z4OFBt4H+2fim1DsTOQI8Hn8sELcTpb YjbuKdLEvfYi+LmIGufVyNkF07MXZ8Mtd2A+kXTwm4rKGq9Hp16C9in3Sp/Qi+A/Ma4k5 Xaqejm20jncYPVawvvgODcFL0GxdmmrU7biDzdZPVvQBlgEMueQCMM4eJ0WQgZjjMBoo7 WK97IrR6J7bhux2ucpvUSJxMM09FldNlQnxmPUH/cpS+MOl5aX+8F5AlGP7v+4olLTQyA ZQXgWBI3aL/nKPtOcOQ1BmQrQvlMxIyzjN0aqOyGtZKPSbB66ZnkE96CcHRwgIkUfsA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=ycEcgu+s; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B02EA60A3832; Mon, 2 Nov 2026 14:14:55 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B02EA60A3832 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=ycEcgu+s+neTmnM7TKA1V0bx9kJSLfZbh8EqVAkprnKgSOiRbb7DKfeMevtPMsSflIuAMn26Dy6t1 feXlCCnHLj00Z4SxyM5vnLv3Pn/R2DV+EAo0ARMdJtTm2Qb9YIbZgKNBzxNPLNC/EU2iybj4fPyU8c pEBlbL46tOwZyvjs= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app05-12005 (RichMail) with SMTP id 2ee56ae89ad3132-88258; Mon, 02 Nov 2026 22:14:52 +0800 (CST) X-RM-TRANSID: 2ee56ae89ad3132-88258 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from localhost.localdomain (unknown[112.23.104.16]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee26ae89ad9a5a-d4486; Mon, 02 Nov 2026 22:14:52 +0800 (CST) X-RM-TRANSID: 2ee26ae89ad9a5a-d4486 X-Cc: netdev@vger.kernel.org, edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com, davem@davemloft.net, kuba@kernel.org, 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 X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <062d02ca-e9e1-4f4e-ac57-0de27272a205@linux.dev> X-Mailer: git-send-email 2.43.0 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