fix the bug that IPv6 TCP connection fail

The code didn't create an new mld group when netif is up,
this will lead to the server can't find the matching netif
when receiving NS(neighbor solicitation) packet
This commit is contained in:
zhangyanjiao
2018-09-21 10:14:24 +08:00
parent e6f0cab39b
commit 99d992cac3
+9
View File
@@ -890,6 +890,15 @@ nd6_tmr(void)
#endif
/* @todo implement preferred and valid lifetimes. */
} else if (netif->flags & NETIF_FLAG_UP) {
#if ESP_LWIP
#if LWIP_IPV6_MLD
if ((netif_ip6_addr_state(netif, i) & IP6_ADDR_TENTATIVE_COUNT_MASK) == 0) {
/* Join solicited node multicast group. */
ip6_addr_set_solicitednode(&multicast_address, netif_ip6_addr(netif, i)->addr[3]);
mld6_joingroup(netif_ip6_addr(netif, i), &multicast_address);
}
#endif /* LWIP_IPV6_MLD */
#endif
/* Send a NS for this address. */
nd6_send_ns(netif, netif_ip6_addr(netif, i), ND6_SEND_FLAG_MULTICAST_DEST);
/* tentative: set next state by increasing by one */