From nobody Sun Jul 10 12:48:45 2022 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5B2FC1D018AF for ; Sun, 10 Jul 2022 12:48:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LgmzK0TYJz405C for ; Sun, 10 Jul 2022 12:48:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LgmzJ6j6LzQHg for ; Sun, 10 Jul 2022 12:48:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 26ACmiJT064367 for ; Sun, 10 Jul 2022 12:48:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26ACmiPE064366 for net@FreeBSD.org; Sun, 10 Jul 2022 12:48:44 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 265089] Connection errors with IPv6 source address validation Date: Sun, 10 Jul 2022 12:48:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657457325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0fTHB8cYz4DdqdX2mYfAbxtozfaU4zvBvkGEX3nxiGA=; b=CXgNaLEEfT2O6twD3QfIo2wVAvs0yW3vYvvL55AGOtKNGZxE32x0LKzlf/cfEBMsVpjZB7 +X+jgd8xFb0TPtMhmkDWaLcqqthbsTJZaEccVF2oGhO2Kf6bB9w0ahrzEkEV2irZO+DvW7 UDfOVj/8Fg+Q+lCGzwuuCRaMSDzrZ7ZwOx9u6N3qB8tvFGrpibDgY40psuCyANF+l99RKS 9bXmvwCDWwpwDBUOyoyGPk8r1HreXvOnddRvPuATvQZ4pzzjWSUBV/Gz0iI9fUKJUKQhw2 diq37MQHCSryeeLkQrmgiTUJestxIISNLy+8BDuBDdToiFIyYuYQlKQsDsAbBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657457325; a=rsa-sha256; cv=none; b=YAlPrEdBlNBVfgE6T7jaU1GWTSoH7svdPWje1Ahx07UnUwnnEu5gHZofOlLyTEJA24JLt+ CYZsrH4TY3OyxnFZDRPP+7ATOah/UcPpp9ugItiqoI/HyLRTKJd8IqEn8E81cxFFbFWx1i DGCvt2ivii8os5bRSToEOWqZ8sjWo9ofInOSfGKU+zOVhk9LmVJBzrOiLTN5yKF9MqaBaS TQiCVVI6y5qy+MAf80KBWA+zMI8bOp9hsrVtyuIpr5Ytr1c7vNbGspefNEsMaaq2SF9qUQ ndQSX23SOo/3l3BF/wOejo8VuUoL050zWzJyqcFccj4jA6ajJRmqlnwPZN6cqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265089 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D50fa27e795eaae97dae87ac4532799f7a= ea87e9f commit 50fa27e795eaae97dae87ac4532799f7aea87e9f Author: Alexander V. Chernikov AuthorDate: 2022-07-10 12:27:23 +0000 Commit: Alexander V. Chernikov CommitDate: 2022-07-10 12:47:47 +0000 netinet6: fix interface handling for loopback traffic Currently, processing of IPv6 local traffic is partially broken: link-local connection fails and global unicast connect() takes 3 seconds to complete. This happens due to the combination of multiple factors. IPv6 code passes original interface "origifp" when passing traffic via loopack to retain the scope that is mandatory for the correct hadling of link-local traffic. First problem is that the logic of passing source interface is not working correcly for TCP connections, resulting in passing "origifp" on the first 2 connection attempts and lo0 on the subsequent ones. Second problem is that source address validation logic skips its checks iff the source interface is loopback, which doesn't cover "origifp" case. More detailed description is available at https://reviews.freebsd.org/D35732 Fix the first problem by untangling&simplifying ifp/origifp logic. Fix the second problem by switching source address validation check to using M_LOOP mbuf flag instead of interface type. PR: 265089 Reviewed by: ae, bz(previous version) Differential Revision: https://reviews.freebsd.org/D35732 MFC after: 2 weeks sys/netinet6/ip6_input.c | 2 +- sys/netinet6/ip6_output.c | 61 ++++++++++++++++++-------------= ---- tests/sys/netinet6/test_ip6_output.py | 4 +-- 3 files changed, 35 insertions(+), 32 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=