ruby-dns / net-dns

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

Net::DNS::Resolver.new(:source_port) doesn't working #65

Open promix17 opened 9 years ago

promix17 commented 9 years ago

First of all, unknown 'root?' function called at 440 line. It raises NoMethodError at line 278. If I def root? as true, then function 'query_udp' (1195) works wrong -because it binds same port twice - for ipv4 and ipv6. If I remove ipv6 it doesn't work too, because you should close sockets after use. You can fix it by doing something like that: http://pastebin.com/PtgVeEH3