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 | 077cfbe8a4e8ecb1a271a8991cedd5c150b9563d (patch) | |
tree | 8b58806c4da69c800dc708db62f40eabb0f3e54b | |
parent | 45fa794da047da8df938702a0131a6fe17d68736 (diff) | |
download | prosody-077cfbe8a4e8ecb1a271a8991cedd5c150b9563d.tar.gz prosody-077cfbe8a4e8ecb1a271a8991cedd5c150b9563d.zip |
portmanager: Add use_ipv4 option, default to true.
-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"); |