aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-03-27 23:32:34 +0100
committerKim Alvefur <zash@zash.se>2013-03-27 23:32:34 +0100
commit1b1da546867e1ed1a6db7b4e00607874d3f915ad (patch)
tree3e6fe2ced2ccc4418ca8550c2943fd49c29f2826 /core
parent1ae928562845db6f1ce859ec99691c24122d4600 (diff)
downloadprosody-1b1da546867e1ed1a6db7b4e00607874d3f915ad.tar.gz
prosody-1b1da546867e1ed1a6db7b4e00607874d3f915ad.zip
portmanager: use_ipv6 defaults to true if luasocket has ipv6 support
Diffstat (limited to 'core')
-rw-r--r--core/portmanager.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index b02ba53b..4c13f1ad 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -1,6 +1,7 @@
local config = require "core.configmanager";
local certmanager = require "core.certmanager";
local server = require "net.server";
+local socket = require "socket";
local log = require "util.logger".init("portmanager");
local multitable = require "util.multitable";
@@ -19,7 +20,7 @@ module "portmanager";
local default_interfaces = { "*" };
local default_local_interfaces = { "127.0.0.1" };
-if config.get("*", "use_ipv6") then
+if socket.tcp6 and config.get("*", "use_ipv6") ~= false then
table.insert(default_interfaces, "::");
table.insert(default_local_interfaces, "::1");
end