aboutsummaryrefslogtreecommitdiffstats
path: root/net/resolvers/basic.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-01-25 14:38:17 +0000
committerMatthew Wild <mwild1@gmail.com>2020-01-25 14:38:17 +0000
commitecb2a069af5f1f96583b7b1c0ec88e2bf30d3980 (patch)
tree6dd751460cdba64ecb8339bbe59c3d7011076f97 /net/resolvers/basic.lua
parent7a7f98f364cea699b2c12b86db6c8dff0ffe18f1 (diff)
downloadprosody-ecb2a069af5f1f96583b7b1c0ec88e2bf30d3980.tar.gz
prosody-ecb2a069af5f1f96583b7b1c0ec88e2bf30d3980.zip
net.resolvers.basic: Obey extra.use_ipv4/use_ipv6
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 7d326c44..438448b2 100644
--- a/net/resolvers/basic.lua
+++ b/net/resolvers/basic.lua
@@ -43,7 +43,7 @@ function methods:next(cb)
-- Resolve DNS to target list
local dns_resolver = adns.resolver();
- if self.connector_options.use_ipv4 ~= false then
+ if not self.extra or self.extra.use_ipv4 ~= false then
dns_resolver:lookup(function (answer)
if answer then
for _, record in ipairs(answer) do
@@ -54,7 +54,7 @@ function methods:next(cb)
end, self.hostname, "A", "IN");
end
- if self.connector_options.use_ipv6 ~= false then
+ if not self.extra or self.extra.use_ipv6 ~= false then
dns_resolver:lookup(function (answer)
if answer then
for _, record in ipairs(answer) do