Merge pull request #736 from ali-graham/ws_disable_ipv6

[websocket] disable ipv6 in ws_init if disabled in config
This commit is contained in:
Christian Meffert 2019-05-05 17:37:08 +02:00 committed by GitHub
commit d43e688dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,6 +381,8 @@ websocket_init(void)
memset(&info, 0, sizeof(info));
info.port = websocket_port;
info.protocols = protocols;
if (!cfg_getbool(cfg_getsec(cfg, "general"), "ipv6"))
info.options |= LWS_SERVER_OPTION_DISABLE_IPV6;
info.gid = -1;
info.uid = -1;