aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-03-27 23:48:39 +0100
committerKim Alvefur <zash@zash.se>2013-03-27 23:48:39 +0100
commit077cfbe8a4e8ecb1a271a8991cedd5c150b9563d (patch)
tree8b58806c4da69c800dc708db62f40eabb0f3e54b /core
parent45fa794da047da8df938702a0131a6fe17d68736 (diff)
downloadprosody-077cfbe8a4e8ecb1a271a8991cedd5c150b9563d.tar.gz
prosody-077cfbe8a4e8ecb1a271a8991cedd5c150b9563d.zip
portmanager: Add use_ipv4 option, default to true.
Diffstat (limited to 'core')
-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");