aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/s2s
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/s2s')
-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