aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/portmanager.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index 4c13f1ad..9684e9db 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -18,8 +18,12 @@ module "portmanager";
--- Config
-local default_interfaces = { "*" };
-local default_local_interfaces = { "127.0.0.1" };
+local default_interfaces = { };
+local default_local_interfaces = { };
+if config.get("*", "use_ipv4") ~= false then
+ table.insert(default_interfaces, "*");
+ table.insert(default_local_interfaces, "127.0.0.1");
+end
if socket.tcp6 and config.get("*", "use_ipv6") ~= false then
table.insert(default_interfaces, "::");
table.insert(default_local_interfaces, "::1");