[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loolwsd.xml.in wsd/LOOLWSD.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 4 07:45:29 UTC 2018


 loolwsd.xml.in  |    1 -
 wsd/LOOLWSD.cpp |   16 +---------------
 2 files changed, 1 insertion(+), 16 deletions(-)

New commits:
commit dd90ed9e89e2dab23a1f5a633e976981427dbc00
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Thu Oct 4 09:44:33 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Oct 4 09:44:45 2018 +0200

    Revert "tdf#115163 allow bind to INADDR_LOOPBACK"
    
    Incomplete patch pushed by mistake. :(
    
    This reverts commit 2879dc9afd303f8d5bcdb4b71a8041e20adfbe4e.
    
    Change-Id: I1fc159a168e499a2df78a5f8e35a031f8e7485df

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;


More information about the Libreoffice-commits mailing list