each_address should now resolve for AAAA first

AAAA over A is standards track behaviour as per RFC 6724.
This commit is contained in:
Sadiq Saif 2018-11-23 11:38:43 -05:00 коммит произвёл Hiroshi SHIBATA
Родитель 4cd893b048
Коммит 1b3f18afce
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -396,10 +396,10 @@ class Resolv
# be a Resolv::IPv4 or Resolv::IPv6
def each_address(name)
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
if use_ipv6?
each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
end
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
end
def use_ipv6? # :nodoc: