git: f327a5765b77 - stable/14 - ipfw: fix copy&paste bug for number:array tables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Nov 2023 10:50:35 UTC
The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=f327a5765b77e4e465117739957bfe45869bd98b commit f327a5765b77e4e465117739957bfe45869bd98b 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:49:32 +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 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); }