From nobody Mon Oct 03 10:14:59 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 4MgxXk0DzBz4d6sy for ; Mon, 3 Oct 2022 10:15:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MgxXj6kkzz3jlv; Mon, 3 Oct 2022 10:15:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664792101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKgF3LSMOJvW+SF8NuMzV2+5LgS7GmZI3EoOQUUIkQE=; b=CeVNWzeINgw0Zrzaz1qtxcSnnxsMC6xiuJQcnEe1yhedpwUDKPLtkl0G+px/WeirYfI0Sw Ctn1Q7C6nh4xqsROXuG6zxZ1erJ0zDIdUpxnU5BbkemfrQ5fiFlE6svspnbb/+F8/G83s4 pLdcuhhg2bGKYsdeaIEXaPsHUxAFDnWphbTftlvP7V2JsxHuraIaugryXPL7nD5gnUVj0r r7zQl1V301Rb3PKRiWSnWgZzsMI7QVNNWZ9wPxmtKFhWwuFPbzytHaYzK9pMZu1yxL8B78 yZpaXeDksC6a3dZ44qrVmL309yMERX8gNGZJW7dM7h84OCQKkXkDRMNhmQX3cg== Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MgxXj37g5z1Gjj; Mon, 3 Oct 2022 10:15:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: Date: Mon, 3 Oct 2022 13:14:59 +0300 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.3.1 Content-Language: en-US To: "net@FreeBSD.org" From: Andriy Gapon Subject: in_pcbbind_setup: wrong condition regarding INP_REUSEPORT ? Cc: Sean Bruno Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664792101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKgF3LSMOJvW+SF8NuMzV2+5LgS7GmZI3EoOQUUIkQE=; b=HOXbizF4DfD6YMpK8y7VFEjRDhVKidsgLPCDMWY0AUXYIF/J4pffp7/HC9ygm4mmCd6Kcd 2ODbgMFKD/mH8H4y5EYcG6KtHfqA4nLFeexIFxUHlRh/7lhPJwoD0tNRDaXOzN1fpil6sU rtdSH5G40Yre9Gt/jN1COtzgeClZB6/eOxhFmmEg74fkNS0AZV3nzPNXvfAQP8oWe+VCux lvOHxg8ZzQxwML0+DahLhz6LhDG2EeFvAMJ0Lgv74CgpFweW1eop1XhhJOSIU+wmNOPXkx QiPgNlXRvsqlbFVtiQXB91UEFwT6HSsbUPbonOI6rYax65VvnW/pn4ujir4B+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664792101; a=rsa-sha256; cv=none; b=cFSiyjuReFeNN13EehbiaKXTJqVRdtV3mlVS1nUTrUoZtqNQrPVpOzAz9Jh4h8m4enR5i5 ayVoGs6qSdPBYgHOf2lJqQgVjhaA4yIXUpOqvKhE5cnO2KLmHzC1aL/+2w3/zUrwubZUKP vjQ46m72t+m4LlGKxmN9iwwlTrUxYuZnKc7goOYrL+uqgBV/5RBqHpa2nXWSsE/8qKFUTm RgDdLIe7EiZccslmCwx3JhsC71ormJR4zNGAkT3s52e0ZL7dHPxzFDeLm4MInRZsjOAZBK Cd5dEOwus3CFYBExq7koiPFVBoOl7pxY7HCqfLIrbJ2i4MAB+TxnoPpvNX74Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N I must admit that the condition in question is fairly long and non-trivial and I cannot decipher it, but these two lines look wrong to me: (t->inp_flags2 & INP_REUSEPORT) || (t->inp_flags2 & INP_REUSEPORT_LB) == 0) && I'd expect that the check would be symmetric with respect to INP_REUSEPORT and INP_REUSEPORT_LB. The problem seems to come from 1a43cff92a20d / r334719 / D11003. -- Andriy Gapon