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
commite83dd1f241b696502a39bf510f06836e16b075d0 (patch)
tree8b58806c4da69c800dc708db62f40eabb0f3e54b /core
parent1b1da546867e1ed1a6db7b4e00607874d3f915ad (diff)
downloadprosody-e83dd1f241b696502a39bf510f06836e16b075d0.tar.gz
prosody-e83dd1f241b696502a39bf510f06836e16b075d0.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");