From nobody Tue Nov 14 04:42:25 2023 X-Original-To: dev-commits-src-all@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 4STtv52FbDz51F30; Tue, 14 Nov 2023 04:42:25 +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 4STtv51ksNz4vZl; Tue, 14 Nov 2023 04:42:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699936945; 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=XRvh8TSgXsSAbImRdd3Ns/WZ2MjzKJZLJs5B5KPNywQ=; b=iuqaknqDFLzPHNvF/T6Yb3Kwi6K585hZ+xxl9tAHio7PUkp5rg2Tu2z1Csvzi3jGtdIrp9 C9yMXxoNkUETaVgCIx6wAmd23gqEYdpoi/ITSn9fcp7aPic9ubItS2rKEcVjz+NqEHlwOJ RVdlH2ZVLQIM2u83mxTtFg4KcK2SmzgRwO7K78NXOX+TozPe7QHuz5tem0w4nFOULgM+Vv HduIczNvgsoUhE985Bbiy3D1dkE+WJvpEXl9koiO5aTaG7axzCNgKtczkDS3a27Y1AtGcA vJpvWhBz8DC6B37EKKqYOKU5NIywpeYgEDMwuzy+mLoL4Qpe2z4WlJihTEfJ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699936945; 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=XRvh8TSgXsSAbImRdd3Ns/WZ2MjzKJZLJs5B5KPNywQ=; b=dhLSWH+ljM5oCinIbqh6NVSIbQu4mXp4tkXopkElpIVuzw5ZrUKWgJ3ssOlScWatyikEM/ WF52GmDqSxG63kwtTmPaXGDRgjxXUa8bO6Gje7W7N9WqSttZ4COqX9NqM/bY2tIJmMARmX eP2us2RdOvP38FGyz0uXSxjFqrSeZIv2kocIe3ukxe6Epeychj/I0YQGECEFHKD9ak0snU rAjefOzLfPGea5HcE0OCIVE80c5NcS5v2SSVG7bMeyfo8q7VYk57vO11dt3XE5S7ymazL8 uJFeHa6VGJTTAjVo4RXP9kAqMkxhEgS6HIINE70pYh2DshE2pb9i/cBBfV/gNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699936945; a=rsa-sha256; cv=none; b=mD5ctfYiKR49R5kPqznvf3IpMiDOIEUv0sydaTofcI7RSjdegJU4OQyuU67fHvBV7JwJtC P5d4itxUAOh5bwXC/C6BLomZW1V63C4fDFfoy2RNTbBtj3eD0GUaF13LpCKS6nySIc/8+L VNN6rkOYMvsu+N6jDz5D0i04Z2dstsdBUY5xvPo2xv53ka+aHa0zXNhl4HMM9qJtjg+lsa 4LUeizOAIxA8GF2/2te7Enac+c8oPKPFHGSbNlJ1qqRYC+WLi3YSW2PpvEEPnykPAAdm9U ZPD0WBAFjX3CBjdO5RtjAKm16bxYyzv+R016IFxWlDSHuJfVu3k4llBrUOioHQ== 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 4STtv50pfVzbHW; Tue, 14 Nov 2023 04:42:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AE4gPGO099395; Tue, 14 Nov 2023 04:42:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE4gPj9099392; Tue, 14 Nov 2023 04:42:25 GMT (envelope-from git) Date: Tue, 14 Nov 2023 04:42:25 GMT Message-Id: <202311140442.3AE4gPj9099392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 194df014feeb - main - ipfw: fix copy&paste bug for number:array tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 194df014feebd8b169b41ecd75ae73d63a792d6b Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=194df014feebd8b169b41ecd75ae73d63a792d6b commit 194df014feebd8b169b41ecd75ae73d63a792d6b Author: Andrey V. Elsukov AuthorDate: 2023-11-14 04:37:04 +0000 Commit: Andrey V. Elsukov CommitDate: 2023-11-14 04:37:04 +0000 ipfw: fix copy&paste bug for number:array tables Use compare_numarray() method for binary search. This fixes table lookups for keys greater than UINT16_MAX. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC --- sys/netpfil/ipfw/ip_fw_table_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c index 2fa65c78c453..89e6b69bc3ad 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -2693,7 +2693,7 @@ numarray_find(struct table_info *ti, void *key) struct numarray *ri; ri = bsearch(key, ti->state, ti->data, sizeof(struct numarray), - compare_ifidx); + compare_numarray); return (ri); }