Fix my previous netconn_do_listen changes in lwip_netconn_do_listen

This commit is contained in:
Dirk Ziegelmeier 2016-03-03 23:16:01 +01:00
parent 9a4c66006e
commit bd0b51c9ef

View File

@ -1288,7 +1288,7 @@ lwip_netconn_do_listen(struct api_msg_msg *msg)
/* "Socket API like" dual-stack support: If IP to listen to is IP6_ADDR_ANY,
* and NETCONN_FLAG_IPV6_V6ONLY is NOT set, use IP_ANY_TYPE to listen
*/
if (ip_addr_cmp(API_EXPR_REF(msg->msg.bc.ipaddr), IP6_ADDR_ANY) &&
if (ip_addr_cmp(&msg->conn->pcb.ip->local_ip, IP6_ADDR_ANY) &&
((msg->conn->flags & NETCONN_FLAG_IPV6_V6ONLY) == 0)) {
/* change PCB type to IPADDR_TYPE_ANY */
IP_SET_TYPE_VAL(msg->conn->pcb.tcp->local_ip, IPADDR_TYPE_ANY);