Fix off-by-one error in KASSERT from 02f26e98c7.

This commit is contained in:
Gleb Smirnoff 2021-04-19 17:20:19 -07:00
parent 2763a0928a
commit faa9ad8a90

View File

@ -470,7 +470,7 @@ tcp_hc_insert(struct in_conninfo *inc)
*/
TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q);
V_tcp_hostcache.hashbase[hash].hch_length++;
KASSERT(V_tcp_hostcache.hashbase[hash].hch_length <
KASSERT(V_tcp_hostcache.hashbase[hash].hch_length <=
V_tcp_hostcache.bucket_limit,
("tcp_hostcache: bucket length too high at %u: %u",
hash, V_tcp_hostcache.hashbase[hash].hch_length));