Software /
code /
prosody
Changeset
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 |
parents | 5391:0d49a4e9963b |
children | 5393:57c4964eff0b |
files | core/portmanager.lua |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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");