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;