aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2012-04-28 22:34:05 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2012-04-28 22:34:05 +0200
commit005331cb75eeee3e13d35bcc8187d70eb409e48d (patch)
treecc0db87cbdd254c265a2aa042990207b71e95585 /plugins
parent570492f6278129b438e8f783563ad0473c1ef9bc (diff)
downloadprosody-005331cb75eeee3e13d35bcc8187d70eb409e48d.tar.gz
prosody-005331cb75eeee3e13d35bcc8187d70eb409e48d.zip
s2sout.lib: Check whether lua-socket supports IPv6
Diffstat (limited to 'plugins')
-rw-r--r--plugins/s2s/s2sout.lib.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/s2s/s2sout.lib.lua b/plugins/s2s/s2sout.lib.lua
index 011c864f..f3496597 100644
--- a/plugins/s2s/s2sout.lib.lua
+++ b/plugins/s2s/s2sout.lib.lua
@@ -271,6 +271,10 @@ function s2sout.make_connect(host_session, connect_host, connect_port)
if connect_host.proto == "IPv4" then
conn, handler = socket.tcp();
else
+ if not socket.tcp6 then
+ log("warn", "Could not connect to "..to_host..". Your version of lua-socket does not support IPv6");
+ return false, "no-ipv6";
+ end
conn, handler = socket.tcp6();
end