The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c8bc874172033ad2a67c60b70d578fc20f616243

commit c8bc874172033ad2a67c60b70d578fc20f616243
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2022-09-09 16:18:04 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2022-09-09 16:19:39 +0000

    ip_reass: fixup the just added tunable
    
    - Don't use hardcoded hash mask
    - free the memory on VNET destroy
    
    Fixes:  1494f4776af32b49e3c5bbdf09d6b2995b374614
---
 sys/netinet/ip_reass.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c
index 88ba74ace4d6..5227b1387c69 100644
--- a/sys/netinet/ip_reass.c
+++ b/sys/netinet/ip_reass.c
@@ -70,7 +70,7 @@ SYSCTL_DECL(_net_inet_ip);
  */
 #define        IPREASS_NHASH_LOG2      10
 #define        IPREASS_NHASH           (1 << IPREASS_NHASH_LOG2)
-#define        IPREASS_HMASK           (IPREASS_NHASH - 1)
+#define        IPREASS_HMASK           (V_ipq_hashsize - 1)
 
 struct ipqbucket {
        TAILQ_HEAD(ipqhead, ipq) head;
@@ -759,6 +759,7 @@ ipreass_destroy(void)
        V_ipq_zone = NULL;
        for (int i = 0; i < V_ipq_hashsize; i++)
                mtx_destroy(&V_ipq[i].lock);
+       free(V_ipq, M_IPREASS_HASH);
 }
 #endif
 

Reply via email to