From 0f2d472722aaa0cab6e8a72896699541e65bd45b Mon Sep 17 00:00:00 2001 From: Li Bo Date: Thu, 15 Jun 2023 21:26:24 +0800 Subject: [PATCH] napt: restore to the initial state in deinit This bug casue NAPT not work as normal after deinit then reinit --- src/core/ipv4/ip4_napt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ipv4/ip4_napt.c b/src/core/ipv4/ip4_napt.c index 4ecc1c04f..2cd503878 100644 --- a/src/core/ipv4/ip4_napt.c +++ b/src/core/ipv4/ip4_napt.c @@ -169,6 +169,8 @@ static void ip_napt_deinit(void) { napt_list = NO_IDX; + napt_list_last = NO_IDX; + napt_free = 0; ip_napt_max = 0; ip_portmap_max = 0; mem_free(ip_napt_table);