summaryrefslogtreecommitdiff
path: root/thirdparty/libwebsockets/ipv6_fixes.diff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-06 14:47:37 +0100
committerGitHub <noreply@github.com>2019-03-06 14:47:37 +0100
commit97774f6f69a5566a526c161411ecdf34a5a90b14 (patch)
tree822e398f89f1e4e9af9638454d0994d3d5785e68 /thirdparty/libwebsockets/ipv6_fixes.diff
parent9b5c6f539b0049cbcf12507167eb028013219c45 (diff)
parent6d64a54d75ca0ad2bfd11a8acc3aeb2444b60cee (diff)
Merge pull request #26688 from Faless/net/lws_3.1
Update libwebsockets to 3.1, fix IPv6 issues
Diffstat (limited to 'thirdparty/libwebsockets/ipv6_fixes.diff')
-rw-r--r--thirdparty/libwebsockets/ipv6_fixes.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/thirdparty/libwebsockets/ipv6_fixes.diff b/thirdparty/libwebsockets/ipv6_fixes.diff
new file mode 100644
index 0000000000..5fa1e5c520
--- /dev/null
+++ b/thirdparty/libwebsockets/ipv6_fixes.diff
@@ -0,0 +1,32 @@
+diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
+index 693efd28e..192dddee6 100644
+--- a/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
++++ b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
+@@ -73,6 +73,11 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)
+ int optval = 1;
+ socklen_t optlen = sizeof(optval);
+
++#ifdef LWS_WITH_IPV6
++ optval = 0;
++ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
++#endif
++
+ #if defined(__APPLE__) || \
+ defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__NetBSD__) || \
+diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
+index bf0935057..62a0a4984 100644
+--- a/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
++++ b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
+@@ -56,6 +56,11 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd,
+ struct protoent *tcp_proto;
+ #endif
+
++#ifdef LWS_WITH_IPV6
++ optval = 0;
++ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
++#endif
++
+ if (vhost->ka_time) {
+ /* enable keepalive on this socket */
+ optval = 1;