Software /
code /
prosody
Changeset
5391:0d49a4e9963b
portmanager: use_ipv6 defaults to true if luasocket has ipv6 support
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 27 Mar 2013 23:32:34 +0100 |
parents | 5390:b3c8757ee4f4 |
children | 5392:613959dbd0b2 |
files | core/portmanager.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/portmanager.lua Wed Mar 27 23:09:47 2013 +0100 +++ b/core/portmanager.lua Wed Mar 27 23:32:34 2013 +0100 @@ -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 @@ 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