Uncaught error when IPv6 disabled
uidzip opened this issue · 0 comments
When IPv6 is disabled on a machine, Errno::EAFNOSUPPORT is thrown by Net::DNS::Resolver and not caught. Patch forthcoming.
irb(main):016:0> require 'reversed'
=> true
irb(main):017:0> Reversed.lookup('8.8.4.4')
Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2) - udp
from /usr/local/lib/ruby/gems/2.3.0/gems/net-dns-0.8.0/lib/net/dns/resolver.rb:1198:in initialize' from /usr/local/lib/ruby/gems/2.3.0/gems/net-dns-0.8.0/lib/net/dns/resolver.rb:1198:in
new'
from /usr/local/lib/ruby/gems/2.3.0/gems/net-dns-0.8.0/lib/net/dns/resolver.rb:1198:in query_udp' from /usr/local/lib/ruby/gems/2.3.0/gems/net-dns-0.8.0/lib/net/dns/resolver.rb:1007:in
query'
from /usr/local/lib/ruby/gems/2.3.0/gems/net-dns-0.8.0/lib/net/dns/resolver.rb:871:in search' from /usr/local/lib/ruby/gems/2.3.0/gems/reversed-0.2.1/lib/reversed.rb:14:in
lookup'
from (irb):17
from /usr/local/bin/irb:11:in `