From 9f1a8cfb3a63f15bee7551b420ee570eef5fd777 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 14 Mar 2024 11:49:49 -0400 Subject: [PATCH] MT#59661 fix libwebsockets IPv4 binding This was fixed in later versions via 6d0eba93, but it's too large of a commit (and part of a series) to backport. Fix IPv4 bindings separately here. Change-Id: I632971c3a7f2aa65709c5ebb58ef02cf0a45e05a (cherry picked from commit 3f91b9f4083b282da19be01c5089cd763335e854) --- daemon/websocket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/websocket.c b/daemon/websocket.c index 35165b7df..b0d07aec2 100644 --- a/daemon/websocket.c +++ b/daemon/websocket.c @@ -949,6 +949,8 @@ int websocket_init(void) { .protocols = websocket_protocols, }; vhost->vhost_name = vhost->iface; + if (ep.address.family->af == AF_INET && !is_addr_unspecified(&ep.address)) + vhost->options |= LWS_SERVER_OPTION_DISABLE_IPV6; err = "LWS failed to create vhost"; if (!lws_create_vhost(websocket_context, vhost)) goto err;