diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-01-25 14:38:17 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-01-25 14:38:17 +0000 |
commit | d1fbb9197f3546153fc52428115a725eb1399a4c (patch) | |
tree | 6dd751460cdba64ecb8339bbe59c3d7011076f97 | |
parent | c5fcad823ae67e81cb2b9b674d70fb6290117218 (diff) | |
download | prosody-d1fbb9197f3546153fc52428115a725eb1399a4c.tar.gz prosody-d1fbb9197f3546153fc52428115a725eb1399a4c.zip |
net.resolvers.basic: Obey extra.use_ipv4/use_ipv6
-rw-r--r-- | net/resolvers/basic.lua | 4 |
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 |