From 1c9e603299e4141d9be8093aa00e567f990178db Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Fri, 28 Oct 2016 21:28:48 +0000 Subject: [PATCH] netif: fix reset of IPv6 addresses in netif_add() Previously, only the state of the first IPv6 address would be reset, thus possibly keeping other addresses valid (even though zeroed). --- src/core/netif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/netif.c b/src/core/netif.c index d9f595e6..fc9e50b0 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -259,7 +259,7 @@ netif_add(struct netif *netif, #if LWIP_IPV6 for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { ip_addr_set_zero_ip6(&netif->ip6_addr[i]); - netif->ip6_addr_state[0] = IP6_ADDR_INVALID; + netif->ip6_addr_state[i] = IP6_ADDR_INVALID; } netif->output_ip6 = netif_null_output_ip6; #endif /* LWIP_IPV6 */