summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-10-04 09:44:33 +0200
committerAndras Timar <andras.timar@collabora.com>2018-10-04 09:44:45 +0200
commitdd90ed9e89e2dab23a1f5a633e976981427dbc00 (patch)
tree624d414773f4b67994d988a90edbdadc6c821a28
parent6baa59678c34ec1e618ba0a2ac2b74983fbbd858 (diff)
Revert "tdf#115163 allow bind to INADDR_LOOPBACK"3.4-rc7
Incomplete patch pushed by mistake. :( This reverts commit 2879dc9afd303f8d5bcdb4b71a8041e20adfbe4e. Change-Id: I1fc159a168e499a2df78a5f8e35a031f8e7485df
-rw-r--r--loolwsd.xml.in1
-rw-r--r--wsd/LOOLWSD.cpp16
2 files changed, 1 insertions, 16 deletions
diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 022caaecc..587452ba4 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -68,7 +68,6 @@
<net desc="Network settings">
<proto type="string" default="all" desc="Protocol to use IPv4, IPv6 or all for both">all</proto>
- <listen type="string" default="INADDR_ANY" desc="Listen address that loolwsd binds to. Can be INADDR_ANY or INADDR_LOOPBACK.">INADDR_ANY</listen>
<service_root type="path" default="" desc="Prefix all the pages, websockets, etc. with this path."></service_root>
<post_allow desc="Allow/deny client IP address for POST(REST)." allow="true">
<host desc="The IPv4 private 192.168 block as plain IPv4 dotted decimal addresses.">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6b26f107b..eca0644f6 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -168,9 +168,6 @@ int ClientPortNumber = DEFAULT_CLIENT_PORT_NUMBER;
/// Protocols to listen on
Socket::Type ClientPortProto = Socket::Type::All;
-/// INET address to listen on
-ServerSocket::Type ClientListenAddr = ServerSocket::Type::Public;
-
/// Port for prisoners to connect to
int MasterPortNumber = DEFAULT_MASTER_PORT_NUMBER;
@@ -701,7 +698,6 @@ void LOOLWSD::initialize(Application& self)
{ "loleaflet_html", "loleaflet.html" },
{ "loleaflet_logging", "false" },
{ "net.proto", "all" },
- { "net.listen", "INADDR_ANY" },
{ "net.service_root", "" },
{ "num_prespawn_children", "1" },
{ "per_document.autosave_duration_secs", "300" },
@@ -878,16 +874,6 @@ void LOOLWSD::initialize(Application& self)
LOG_WRN("Invalid protocol: " << proto);
}
- {
- std::string listen = getConfigValue<std::string>(conf, "net.listen", "");
- if (!Poco::icompare(listen, "INADDR_ANY"))
- ClientListenAddr = ServerSocket::Type::Public;
- else if (!Poco::icompare(listen, "INADDR_LOOPBACK"))
- ClientListenAddr = ServerSocket::Type::Local;
- else
- LOG_WRN("Invalid listen address: " << listen);
- }
-
// Prefix for the loolwsd pages; should not end with a '/'
ServiceRoot = getPathFromConfig("net.service_root");
while (ServiceRoot.length() > 0 && ServiceRoot[ServiceRoot.length() - 1] == '/')
@@ -2748,7 +2734,7 @@ private:
factory = std::make_shared<PlainSocketFactory>();
std::shared_ptr<ServerSocket> socket = getServerSocket(
- ClientListenAddr, port, WebServerPoll, factory);
+ ServerSocket::Type::Public, port, WebServerPoll, factory);
while (!socket)
{
++port;