diff options
author | Kim Alvefur <zash@zash.se> | 2013-03-27 23:48:39 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-03-27 23:48:39 +0100 |
commit | e83dd1f241b696502a39bf510f06836e16b075d0 (patch) | |
tree | 8b58806c4da69c800dc708db62f40eabb0f3e54b /core | |
parent | 1b1da546867e1ed1a6db7b4e00607874d3f915ad (diff) | |
download | prosody-e83dd1f241b696502a39bf510f06836e16b075d0.tar.gz prosody-e83dd1f241b696502a39bf510f06836e16b075d0.zip |
portmanager: Add use_ipv4 option, default to true.
Diffstat (limited to 'core')
-rw-r--r-- | core/portmanager.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index 4c13f1ad..9684e9db 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -18,8 +18,12 @@ module "portmanager"; --- 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"); |