From: "julian.mehnle (Julian Mehnle)" Date: 2013-04-18T07:36:41+09:00 Subject: [ruby-core:54412] [ruby-trunk - Bug #8285] Resolv::DNS: TCP fallback fails with multiple resolvers Issue #8285 has been updated by julian.mehnle (Julian Mehnle). File ruby-trunk-8285-resolv-tcp-fallback-fix.diff added The problem is caused by my original TCP fallback code reusing a @Resolv::DNS::Requester::TCP::Sender@ object that was initialized for one (the first) nameserver with a @Resolv::DNS::Requester::TCP@ object that was initialized for another (the second) nameserver, and the TCP requester detecting a host/port mismatch between itself and the sender. (The fact that both the requester and the sender are aware of the nameserver's host and port is a design bug in the original code, but I opted not to fix that.) This patch fixes my original TCP fallback code to keep one sender per requester, thereby avoiding mismatch situations. ---------------------------------------- Bug #8285: Resolv::DNS: TCP fallback fails with multiple resolvers https://bugs.ruby-lang.org/issues/8285#change-38679 Author: julian.mehnle (Julian Mehnle) Status: Open Priority: Normal Assignee: Category: lib Target version: ruby -v: ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin11] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN Since my TCP fallback support patch from #3835 was merged Resolv::DNS would sometimes fail with a @"host/port don't match: :"@ @Resolv::DNS::Requester::RequestError@ exception in @resolv.rb@, line 818 (Ruby 1.9.1). This happens when more than one nameserver is configured and Resolv::DNS is has fallen back to TCP and rotates from the first to the second nameserver (e.g., when there was a timeout in the TCP query to the first nameserver). -- http://bugs.ruby-lang.org/