Date: Tue, 21 Nov 2023 10:51:44 GMT From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e7a86775f751 - stable/13 - ipfw: fix copy&paste bug for number:array tables Message-ID: <202311211051.3ALApint071311@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=e7a86775f7510ad57409adfdfbd3ccaf3a31bed2 commit e7a86775f7510ad57409adfdfbd3ccaf3a31bed2 Author: Andrey V. Elsukov <ae@FreeBSD.org> AuthorDate: 2023-11-14 04:37:04 +0000 Commit: Andrey V. Elsukov <ae@FreeBSD.org> CommitDate: 2023-11-21 10:51:15 +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 (cherry picked from commit 194df014feebd8b169b41ecd75ae73d63a792d6b) --- 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 44750b8baa7b..f2ea1ddfc384 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -2696,7 +2696,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311211051.3ALApint071311>