From 5c4f899f8e7b58ef53522b6f832fc940e29bf0b9 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 b51c2f919..0cf228cef 100644 --- a/src/core/ipv4/ip4_napt.c +++ b/src/core/ipv4/ip4_napt.c @@ -176,6 +176,8 @@ static void ip_napt_deinit(void) { napt_list = NO_IDX; + napt_list_last = NO_IDX; + napt_free = 0; ip_napt_max = 0; #if IP_NAPT_PORTMAP ip_portmap_max = 0;