# HG changeset patch # User Matthew Wild # Date 1579963097 0 # Node ID 0725b7b8dc1463290620820960df43cd0199f89c # Parent f51c88baeb8a00a07c6ed36380f91c5d999b8f48 net.resolvers.basic: Obey extra.use_ipv4/use_ipv6 diff -r f51c88baeb8a -r 0725b7b8dc14 net/resolvers/basic.lua --- a/net/resolvers/basic.lua Sat Jan 25 14:25:29 2020 +0000 +++ b/net/resolvers/basic.lua Sat Jan 25 14:38:17 2020 +0000 @@ -43,7 +43,7 @@ -- 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 @@ 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