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
This commit is contained in:
parent
9b57e30cf5
commit
194df014fe
|
@ -2693,7 +2693,7 @@ numarray_find(struct table_info *ti, void *key)
|
||||||
struct numarray *ri;
|
struct numarray *ri;
|
||||||
|
|
||||||
ri = bsearch(key, ti->state, ti->data, sizeof(struct numarray),
|
ri = bsearch(key, ti->state, ti->data, sizeof(struct numarray),
|
||||||
compare_ifidx);
|
compare_numarray);
|
||||||
|
|
||||||
return (ri);
|
return (ri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue