mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
portmanager: Add use_ipv4 option, default to true.
This commit is contained in:
parent
45fa794da0
commit
077cfbe8a4
1 changed files with 6 additions and 2 deletions
|
@ -18,8 +18,12 @@ module "portmanager";
|
||||||
|
|
||||||
--- Config
|
--- Config
|
||||||
|
|
||||||
local default_interfaces = { "*" };
|
local default_interfaces = { };
|
||||||
local default_local_interfaces = { "127.0.0.1" };
|
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
|
if socket.tcp6 and config.get("*", "use_ipv6") ~= false then
|
||||||
table.insert(default_interfaces, "::");
|
table.insert(default_interfaces, "::");
|
||||||
table.insert(default_local_interfaces, "::1");
|
table.insert(default_local_interfaces, "::1");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue