From nobody Sun Jul 24 22:12:12 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 4Lrcq13lPDz3ynLW for ; Sun, 24 Jul 2022 22:12:13 +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 4Lrcq12ddCz3qX6 for ; Sun, 24 Jul 2022 22:12:13 +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 4Lrcq11kN4zZL5 for ; Sun, 24 Jul 2022 22:12:13 +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 26OMCDJF096440 for ; Sun, 24 Jul 2022 22:12:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26OMCDJs096439 for net@FreeBSD.org; Sun, 24 Jul 2022 22:12:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 265064] connect(2): unexpected EADDRINUSE when connecting from IPv6 wildcard to IPv4 address Date: Sun, 24 Jul 2022 22:12:12 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: karels@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: cc 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=1658700733; 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=0UvyRn0f5MyQzQC9y4ZRKjfbZvXToBbn05ROClGzR14=; b=ihwLzMOiHey6HI53IOsJXGb7759Xb9PaYdWbPIPyfK7tb8l30/7w6lioHRhpv+HdHIyUzc yulRi9bIvpTG/wYgu6n5QNA27VifNpKmO8IX/uhHLLvo2pdC5fv/7TwHcqKIGf4gKBuv7H utZwXuDE8aHnkWslkxoTgGqNRON8iiD0IwAEHoSf73UvJcj1gZPJs4Vip4wIZd5llPEKiT 73GdxoIeiCDynTKRbg8NyB6n6hvO++y+0VoxfW6qdLbI8kBs9TI/kMhmO7AjsrSSJML/xt G6sB9eCJu/ZrrFGw/v0UGWGyrvAHrVjjgQmrX4UIfbV0XNNHPkuejCAth5MFig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658700733; a=rsa-sha256; cv=none; b=TVxtvzX5YC7Ez6QsuUDJvamUkh1fCX5rfP1OTyeEXdEB/ysJAog7BOBiFtcbjiP3kArH8s ifcbpqOtWdF2zBK9NowckfdCjIReOqiD0ba95xTUiWHvFbgNRwyBVnZE8m5AuqPixCHygA 4YJEs56zj30ALVIVpepFsZlr3a4+KnzDv8GuziaIkHk+Mlya9PjSTqihq6tOtRFQ1epXNw s1QW10w78ki258/WbhEqKMUnQVR3SgPUyTDuMHi90KnUADKRsmOne36e2jWYKiZrj1IprH 2XDThFUd/xPTguukCFIK+5x7fVRLnb3wkdGk82hbbTPemCOQd9pBRyTAKpwVQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265064 Mike Karels changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |karels@freebsd.org --- Comment #2 from Mike Karels --- The problem is that the bind() for the failing socket should not have succeeded, and the problem isn't discovered until the connect(). The root problem is that bind on an IPv6 socket is allowed to choose a port that is already bound by a previous socket, but which has been connected and hence turned into an IPv4 socket. The connect cannot succeed then, because it wo= uld create a fully duplicate session (4-tuple). I am looking at a fix for the bind, but it is somewhat messy. --=20 You are receiving this mail because: You are the assignee for the bug.=