diff options
| author | He Chunhui <[email protected]> | 2016-03-16 08:00:33 +0000 |
|---|---|---|
| committer | He Chunhui <[email protected]> | 2016-03-16 08:00:33 +0000 |
| commit | 0fc0ed1bb1880014eb81073d3810c88a5e6acd92 (patch) | |
| tree | 604c8e20bb7be32391b7389723f74e113dd76a3c | |
| parent | 54395808339868877f5d401a46ed8885fbbe74a1 (diff) | |
fix copy-paste bug
This bug causes buffer overrun.
| -rw-r--r-- | components/net/lwip_nat/ipv4_nat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/lwip_nat/ipv4_nat.c b/components/net/lwip_nat/ipv4_nat.c index 6f218fc1e1..a49a246129 100644 --- a/components/net/lwip_nat/ipv4_nat.c +++ b/components/net/lwip_nat/ipv4_nat.c @@ -370,12 +370,12 @@ ip_nat_reset_state(ip_nat_conf_t *cfg) } } for (i = 0; i < LWIP_NAT_DEFAULT_STATE_TABLES_TCP; i++) { - if(ip_nat_icmp_table[i].common.cfg == cfg) { + if(ip_nat_tcp_table[i].common.cfg == cfg) { IPNAT_ENTRY_RESET(&ip_nat_tcp_table[i].common); } } for (i = 0; i < LWIP_NAT_DEFAULT_STATE_TABLES_UDP; i++) { - if(ip_nat_icmp_table[i].common.cfg == cfg) { + if(ip_nat_udp_table[i].common.cfg == cfg) { IPNAT_ENTRY_RESET(&ip_nat_udp_table[i].common); } } |
