aboutsummaryrefslogtreecommitdiffstats
path: root/net/resolvers/basic.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-12 16:25:30 +0200
committerKim Alvefur <zash@zash.se>2018-10-12 16:25:30 +0200
commit04bef9f4029ae4b96f023f0d7c43d3fa569542b5 (patch)
treec87bc11418a644ca0f323f6d13a5631fcd6fc364 /net/resolvers/basic.lua
parentdfdde6397801c125ec51e7a2a7ced26a39527b1f (diff)
downloadprosody-04bef9f4029ae4b96f023f0d7c43d3fa569542b5.tar.gz
prosody-04bef9f4029ae4b96f023f0d7c43d3fa569542b5.zip
net.resolvers.basic: Suffix IPv4 TCP socket types with '4' to match eg 'tcp6'
Diffstat (limited to 'net/resolvers/basic.lua')
-rw-r--r--net/resolvers/basic.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/resolvers/basic.lua b/net/resolvers/basic.lua
index c2fd9260..9a3c9952 100644
--- a/net/resolvers/basic.lua
+++ b/net/resolvers/basic.lua
@@ -31,7 +31,7 @@ function methods:next(cb)
if #is_ip == 16 then
cb(self.conn_type.."6", self.hostname, self.port, self.extra);
elseif #is_ip == 4 then
- cb(self.conn_type, self.hostname, self.port, self.extra);
+ cb(self.conn_type.."4", self.hostname, self.port, self.extra);
end
return;
end
@@ -41,7 +41,7 @@ function methods:next(cb)
dns_resolver:lookup(function (answer)
if answer then
for _, record in ipairs(answer) do
- table.insert(targets, { self.conn_type, record.a, self.port, self.extra });
+ table.insert(targets, { self.conn_type.."4", record.a, self.port, self.extra });
end
end
ready();