From 58829a4ecff7a23b94a560d94e5ba512d30387fb Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 16 Jul 2021 13:08:59 -0400 Subject: [PATCH] TT#89352 explicitly disable lws IPv6 for IPv4 binds Change-Id: Ibb0defaaf05e5be2937e24e5d04de0647a652349 --- daemon/websocket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/websocket.c b/daemon/websocket.c index 53711dd27..48e20e3d4 100644 --- a/daemon/websocket.c +++ b/daemon/websocket.c @@ -900,6 +900,8 @@ int websocket_init(void) { .protocols = websocket_protocols, }; vhost->vhost_name = vhost->iface; + if (ep.address.family->af == AF_INET) + vhost->options |= LWS_SERVER_OPTION_DISABLE_IPV6; err = "LWS failed to create vhost"; if (!lws_create_vhost(websocket_context, vhost)) goto err; @@ -930,6 +932,8 @@ int websocket_init(void) { // XXX cipher list, key password }; vhost->vhost_name = vhost->iface; + if (ep.address.family->af == AF_INET) + vhost->options |= LWS_SERVER_OPTION_DISABLE_IPV6; err = "LWS failed to create vhost"; if (!lws_create_vhost(websocket_context, vhost)) goto err;