ruby-dns / net-dns

Net::DNS is a DNS library written in Ruby.
http://net-dns.rubyforge.org
Other
165 stars 43 forks source link

undefined method `size' for #<IPAddr: IPv4... #46

Closed printercu closed 6 years ago

printercu commented 11 years ago
1.9.3p374 :025 > Net::DNS::Resolver.new.query("snackandmac.ru", Net::DNS::ANY)
Packet truncated, retrying using TCP
Nameserver 217.23.130.1 not responding within TCP timeout, trying next one
NoMethodError: undefined method `size' for #<IPAddr: IPv4:217.23.130.1/255.255.255.255>
    from __gems_root__/gems/net-dns-0.7.1/lib/net/dns/resolver.rb:1010:in `query'
    from __gems_root__/gems/net-dns-0.7.1/lib/net/dns/resolver.rb:1017:in `query'
    from (irb):25
weppos commented 6 years ago

Can't reproduce

irb(main):001:0> Net::DNS::Resolver.new.query("snackandmac.ru", Net::DNS::ANY)
=> ;; Answer received from 8.8.8.8:53 (93 bytes)
;;
;; HEADER SECTION
;; id = 26903
;; qr = 1   opCode: QUERY   aa = 0  tc = 0  rd = 1
;; ra = 1   ad = 0  cd = 0  rcode = NXDomain
;; qdCount = 1  anCount = 0 nsCount = 1 arCount = 0

;; QUESTION SECTION (1 record):
;; snackandmac.ru.              IN      ANY

;; AUTHORITY SECTION (1 record):
ru.                     1799    IN      SOA     a.dns.ripn.net. hostmaster.ripn.net. 4035842 86400 14400 2592000 3600
stanhu commented 5 years ago

I think this bug was closed prematurely. We see about 100 of these events per day while doing SRV lookups:

image

image