mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
Allow setting/getting socket option IPV6_V6ONLY for stream sockets
only, as datagram sockets do not support dual IP versions yet. Change-Id: I2d89bdaa06b19dc0c553c7be6ac6e9a71d3ce8a5
This commit is contained in:
parent
e65202f825
commit
6c12e5bfbe
@ -1673,6 +1673,9 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen)
|
||||
if (*optlen < sizeof(int)) {
|
||||
err = EINVAL;
|
||||
}
|
||||
/* @todo: this does not work for datagram sockets, yet */
|
||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n",
|
||||
@ -2125,6 +2128,11 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt
|
||||
if (optlen < sizeof(int)) {
|
||||
err = EINVAL;
|
||||
}
|
||||
|
||||
/* @todo: this does not work for datagram sockets, yet */
|
||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP)
|
||||
return 0;
|
||||
|
||||
break;
|
||||
default:
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n",
|
||||
|
Loading…
Reference in New Issue
Block a user