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).
This commit is contained in:
David van Moolenbroek 2016-10-28 21:28:48 +00:00 committed by Dirk Ziegelmeier
parent 1a7ba24d13
commit 1c9e603299

View File

@ -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 */