mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
Fix that the socket option IPV6ONLY can only be set on TCP sockets
Reported by Andrej Butok
This commit is contained in:
parent
3d82155d29
commit
0cf405e24f
@ -3143,7 +3143,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
|||||||
case IPPROTO_IPV6:
|
case IPPROTO_IPV6:
|
||||||
switch (optname) {
|
switch (optname) {
|
||||||
case IPV6_V6ONLY:
|
case IPV6_V6ONLY:
|
||||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP);
|
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int);
|
||||||
if (*(const int*)optval) {
|
if (*(const int*)optval) {
|
||||||
netconn_set_ipv6only(sock->conn, 1);
|
netconn_set_ipv6only(sock->conn, 1);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user