From d1fbb9197f3546153fc52428115a725eb1399a4c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 25 Jan 2020 14:38:17 +0000 Subject: net.resolvers.basic: Obey extra.use_ipv4/use_ipv6 --- net/resolvers/basic.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/resolvers') 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 -- cgit v1.2.3