# HG changeset patch # User Kim Alvefur # Date 1364424519 -3600 # Node ID 613959dbd0b2a270faef1d29540758889add5b3d # Parent 0d49a4e9963b01ca034f2bb6cf1b8a388ae03f4c portmanager: Add use_ipv4 option, default to true. diff -r 0d49a4e9963b -r 613959dbd0b2 core/portmanager.lua --- a/core/portmanager.lua Wed Mar 27 23:32:34 2013 +0100 +++ b/core/portmanager.lua Wed Mar 27 23:48:39 2013 +0100 @@ -18,8 +18,12 @@ --- 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");