diff --git a/components/net/lwip_nat/ipv4_nat.c b/components/net/lwip_nat/ipv4_nat.c index 13c1877f2c88355b9cc8e13841d6322a2309ac3b..6f218fc1e1de8cf359a9abc8df88382dae4aa913 100644 --- a/components/net/lwip_nat/ipv4_nat.c +++ b/components/net/lwip_nat/ipv4_nat.c @@ -229,7 +229,7 @@ nat_timer(void *arg) LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: nat_timer()\n")); ip_nat_tmr(); - sys_timeout(LWIP_NAT_TMR_INTERVAL_SEC, nat_timer, NULL); + sys_timeout(LWIP_NAT_TMR_INTERVAL_SEC * 1000, nat_timer, NULL); } /** Initialize this module */ @@ -255,7 +255,7 @@ ip_nat_init(void) rt_enter_critical(); /* add a lwip timer for NAT */ - sys_timeout(LWIP_NAT_TMR_INTERVAL_SEC, nat_timer, NULL); + sys_timeout(LWIP_NAT_TMR_INTERVAL_SEC * 1000, nat_timer, NULL); /* un-protect */ rt_exit_critical(); diff --git a/components/net/lwip_nat/ipv4_nat.h b/components/net/lwip_nat/ipv4_nat.h index e369c781dac1e440d466d8f20e355ee56f8739dd..b30ed984281fdeafcd272e1eb484116748b757e1 100644 --- a/components/net/lwip_nat/ipv4_nat.h +++ b/components/net/lwip_nat/ipv4_nat.h @@ -67,7 +67,7 @@ #include "lwip/opt.h" /** Timer interval at which to call ip_nat_tmr() */ -#define LWIP_NAT_TMR_INTERVAL_SEC (30*1000) +#define LWIP_NAT_TMR_INTERVAL_SEC (30) #ifdef __cplusplus extern "C" {