Subject: | Net::DNS::Async bug handling retransmitted TCP requests |
Date: | Fri, 25 Mar 2011 15:30:18 -0700 (PDT) |
To: | bug-Net-DNS-Async [...] rt.cpan.org |
From: | Gary Denslow <gary0214 [...] yahoo.com> |
Hello
I'd like to report a bug with Net::DNS::Async 1.07.
When Net::DNS::Resolver needs to retry a request using TCP because the UDP response exceeded the max UDP packet size configured by the client, Net::DNS::Async should properly handle the response from the TCP request rather than using the response from the original truncated UDP request. Because Net::DNS::Async uses the original truncated UDP request, incomplete/truncated data is being used instead of the full/complete/correct dataset.
For example, with Net::DNS::Resolver debugging on, if a response has many A records which causes the response to exceed the max UDP packet size, I can see an ANSWER SECTION containing 29 records (when I expected 34 records). I can also see a 2nd request sent by Net::DNS::Resolver using TCP whereby the response contains the expected 34 records. The answers provided by Net::DNS::Async only includes the 29 records.
A work-around to the bug is to increase the max UDP packet size using Net::DNS::Resolver's udppacketsize().
I was using perl v5.8.8 built for x86_64-linux-thread-multi, Net::DNS::Async 1.07, Net::DNS 0.66. OS: Linux xxx 2.6.18-164.2.1.el5 #1 SMP Wed Sep 30 12:52:46 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux.