debian/changelog | 6 ++++++ loolwsd.spec.in | 2 +- loolwsd.xml.in | 1 + wsd/LOOLWSD.cpp | 16 +++++++++++++++- 4 files changed, 23 insertions(+), 2 deletions(-)
New commits: commit 9fb051c7fbea5988214fa0b1dd9fa9aaf8919211 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Tue Oct 2 16:15:56 2018 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Oct 2 16:15:56 2018 +0200 Bump package version to 3.4.0-7 Change-Id: Ie296797030a7bd1160034e04b6f3acdd9ae1c4ef diff --git a/debian/changelog b/debian/changelog index 00fa5ec89..0d089a9ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +loolwsd (3.4.0-7) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 02 Oct 2018 16:00:00 +0200 + loolwsd (3.4.0-6) unstable; urgency=medium * see the git log: http://col.la/cool3 diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 520a84bc6..16f64690c 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -12,7 +12,7 @@ Name: loolwsd%{name_suffix} Name: loolwsd %endif Version: @PACKAGE_VERSION@ -Release: 6%{?dist} +Release: 7%{?dist} %if 0%{?suse_version} == 1110 Group: Productivity/Office/Suite BuildRoot: %{_tmppath}/%{name}-%{version}-build commit 2879dc9afd303f8d5bcdb4b71a8041e20adfbe4e Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Mon Oct 1 20:17:35 2018 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 1 20:20:47 2018 +0200 tdf#115163 allow bind to INADDR_LOOPBACK Change-Id: I4808fb0fd685dfe990efd5fb739ee86f1276ffad (cherry picked from commit 84e7582192dba674e759b3c43cc4790056187e0a) diff --git a/loolwsd.xml.in b/loolwsd.xml.in index 587452ba4..022caaecc 100644 --- a/loolwsd.xml.in +++ b/loolwsd.xml.in @@ -68,6 +68,7 @@ <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 eca0644f6..6b26f107b 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -168,6 +168,9 @@ 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; @@ -698,6 +701,7 @@ 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" }, @@ -874,6 +878,16 @@ 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] == '/') @@ -2734,7 +2748,7 @@ private: factory = std::make_shared<PlainSocketFactory>(); std::shared_ptr<ServerSocket> socket = getServerSocket( - ServerSocket::Type::Public, port, WebServerPoll, factory); + ClientListenAddr, port, WebServerPoll, factory); while (!socket) { ++port; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits