mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/route: need clear old cached route info when do reset cache
When do net_flushcache_ip4/6, it may have old info at that time. Signed-off-by: Jerry Ma <masc2008@gmail.com>
This commit is contained in:
parent
46ec836e56
commit
52e67d167a
1 changed files with 2 additions and 0 deletions
|
|
@ -400,6 +400,7 @@ static void net_reset_ipv4_cache(void)
|
|||
|
||||
for (i = 0; i < CONFIG_ROUTE_MAX_IPv4_CACHEROUTES; i++)
|
||||
{
|
||||
memset(&g_prealloc_ipv4cache[i], 0, sizeof(g_prealloc_ipv4cache[i]));
|
||||
net_add_newest_ipv4(&g_prealloc_ipv4cache[i]);
|
||||
}
|
||||
}
|
||||
|
|
@ -417,6 +418,7 @@ static void net_reset_ipv6_cache(void)
|
|||
|
||||
for (i = 0; i < CONFIG_ROUTE_MAX_IPv6_CACHEROUTES; i++)
|
||||
{
|
||||
memset(&g_prealloc_ipv6cache[i], 0, sizeof(g_prealloc_ipv6cache[i]));
|
||||
net_add_newest_ipv6(&g_prealloc_ipv6cache[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue