ipv6 interface: add branch for ipv6 interface

This commit is contained in:
tzx
2016-11-10 11:24:31 +08:00
committed by Wu Jian Gang
parent 4d81e40413
commit a8fb9f2b84
11 changed files with 202 additions and 54 deletions

View File

@@ -2775,8 +2775,12 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
case IPPROTO_IPV6:
switch (optname) {
case IPV6_V6ONLY:
/* @todo: this does not work for datagram sockets, yet */
/* @todo: this does not work for datagram sockets, yet */
#if CONFIG_MDNS
//LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP);
#else
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP);
#endif
if (*(const int*)optval) {
netconn_set_ipv6only(sock->conn, 1);
} else {