# HG changeset patch # User Kim Alvefur # Date 1364423554 -3600 # Node ID 0d49a4e9963b01ca034f2bb6cf1b8a388ae03f4c # Parent b3c8757ee4f40f3d51126f5a31f31eeb1d1903d1 portmanager: use_ipv6 defaults to true if luasocket has ipv6 support diff -r b3c8757ee4f4 -r 0d49a4e9963b core/portmanager.lua --- 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