From nobody Thu Feb 02 07:39:32 2023 X-Original-To: dev-commits-src-branches@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 4P6rK02THdz3c8y5; Thu, 2 Feb 2023 07:39:32 +0000 (UTC) (envelope-from git@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 4P6rK01ljxz3C2r; Thu, 2 Feb 2023 07:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675323572; 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; bh=3+ir93/FaqX+0R3KiDEpLwKkostYbjktQr4irgjOd8Q=; b=YEqx4h/PDOCpeaiAWK8oZhBxx54ROE4nvH4uR87FuDR6oPn/bkppElLrbLWXGz8R72b2w4 jCqJXKOhF2EdumvvOq9HbUhufapGDrFUvbutxXr1uuZArtimVIkQW0AU88WLcXFevyBPDN 6mpQwwJSW5rpyFNNw6xsnu7BDvuCcRSD/r0CgofuN87d0cqRaG2LUp0V/3wE08DJIGeVAV Dz4a3okyk9tHHVhWB3k+ovKnrs1W34RF8OCQkRKn5WUVqt7drY8bwUAHv10eGqNYpLTEJy WwzuGB5omgb03IJbHMPcr0jQ6odnZsLRe7/ht/7k1LoR5we6Q2G7Xy2kc0xYag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675323572; 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; bh=3+ir93/FaqX+0R3KiDEpLwKkostYbjktQr4irgjOd8Q=; b=bngPJPj1j1N3AXsSf1PllNH8WQ/W4oQqai8j77k+eGp1o7gQp1Q/C6bIsFD/6/dVmq6zyz AiHlUTHiiA738jLNGKAdsjLXf/MlGVP+tk/Brfit8MGkp2XqKzEdX54AtA/N+ntSuWfxkS omw4cnUnRTiH28RZdoAe8RtpGt4dmT/jVafSr3+sIxrKuaFF7hVhAtICxa81c2QtJ7/wS1 aEv/YmzrYHi2h+aJEIqprQng1ZS0dkQurGkP2yBtUzLTvdkBjRkAVcjWs19D053R8Eglp/ TYCnqFQfguWvuE5cqGBtNvEXMh3QLovztvgvcGTt688VkMUZRNdmHaZ65Bj/wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675323572; a=rsa-sha256; cv=none; b=jKk5N9W2Hrb/zLoZimcdP893rkqK0MSlFmZT9Ye/piJcirG7cpZaUn9T6S9gdKgfGN3bsu eCRPbV1dS8hydYJtLV4ye+Q0JzG8HpY1Z53JazKBxaimRFta5Tug49bZYcVLTjcvxX0xNt Aw9XSXAVlmlIsd5KzBicwG+92qA3CRoP0ATgwfYO3H8jwhIaJvK6pTMzIJyB46P6EY/vN2 nWzwt/A9ZaQGweTsethS6I8HuHNIBWdbNVKzapQoF/axFaAhoumzh7HG2gqlCHMLBOFlIr 5JrLFkNb1uKQ4w9MLkeacjYjeyy70oOLgwhYf9w4fkvsP/Ac+ozBVHxM9zZRTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4P6rK00rt4zmgd; Thu, 2 Feb 2023 07:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3127dWbg062034; Thu, 2 Feb 2023 07:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3127dWbw062033; Thu, 2 Feb 2023 07:39:32 GMT (envelope-from git) Date: Thu, 2 Feb 2023 07:39:32 GMT Message-Id: <202302020739.3127dWbw062033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: d3be047579fd - stable/13 - cxgbe/iw_cxgbe: c4iw_zero_addr should not use IN_ZERONET. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3be047579fddd6ec462b17676c87adfab205502 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=d3be047579fddd6ec462b17676c87adfab205502 commit d3be047579fddd6ec462b17676c87adfab205502 Author: Navdeep Parhar AuthorDate: 2022-05-19 19:25:30 +0000 Commit: Navdeep Parhar CommitDate: 2023-02-02 07:14:48 +0000 cxgbe/iw_cxgbe: c4iw_zero_addr should not use IN_ZERONET. c4iw_zero_addr is supposed to check for all-zero addresses but was using IN_ZERONET (which does something different) for IPv4 addresses. Fix it by simply checking for 0 as is done for IPv6 addresses. Reported by: karels@ Sponsored by: Chelsio Communications (cherry picked from commit 87c5ff0648a8e88b71a66994e1f9ca127fd4ed83) --- sys/dev/cxgbe/iw_cxgbe/cm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c index 6d29116ff1bb..19ec920f48c7 100644 --- a/sys/dev/cxgbe/iw_cxgbe/cm.c +++ b/sys/dev/cxgbe/iw_cxgbe/cm.c @@ -938,8 +938,7 @@ static inline int c4iw_zero_addr(struct sockaddr *addr) struct in6_addr *ip6; if (addr->sa_family == AF_INET) - return IN_ZERONET( - ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr)); + return (((struct sockaddr_in *)addr)->sin_addr.s_addr == 0); else { ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; return (ip6->s6_addr32[0] | ip6->s6_addr32[1] |