Comparison

core/portmanager.lua @ 5392:613959dbd0b2

portmanager: Add use_ipv4 option, default to true.
author Kim Alvefur <zash@zash.se>
date Wed, 27 Mar 2013 23:48:39 +0100
parent 5391:0d49a4e9963b
child 5399:13454b2b86bf
comparison
equal deleted inserted replaced
5391:0d49a4e9963b 5392:613959dbd0b2
16 16
17 module "portmanager"; 17 module "portmanager";
18 18
19 --- Config 19 --- Config
20 20
21 local default_interfaces = { "*" }; 21 local default_interfaces = { };
22 local default_local_interfaces = { "127.0.0.1" }; 22 local default_local_interfaces = { };
23 if config.get("*", "use_ipv4") ~= false then
24 table.insert(default_interfaces, "*");
25 table.insert(default_local_interfaces, "127.0.0.1");
26 end
23 if socket.tcp6 and config.get("*", "use_ipv6") ~= false then 27 if socket.tcp6 and config.get("*", "use_ipv6") ~= false then
24 table.insert(default_interfaces, "::"); 28 table.insert(default_interfaces, "::");
25 table.insert(default_local_interfaces, "::1"); 29 table.insert(default_local_interfaces, "::1");
26 end 30 end
27 31