Charlie Brady wrote: > > On Sun, 28 Sep 2008, Ask Bj�rn Hansen wrote: > >> On Sep 28, 2008, at 12:01 AM, Diego d'Ambra wrote: >> >>> my $res = new Net::DNS::Resolver; >>> $res->tcp_timeout(30); >>> $res->udp_timeout(30); >>> $res->srcport(1024+int(rand(64511))); >> >> Shouldn't this fix be in Net::DNS::Resolver? > > http://search.cpan.org/src/OLAF/Net-DNS-0.63/Changes > > Apparently some hjp caused that to be so in June 2007.
In 0.60 actually: Fix rt 23961 Randomized the ID on the queries. Thanks to "hjp" for reporting and suggesting a fix. The randomization of the src port is supposed to be handled by the setting the source port to "0" (default). Overriding the default or using persistent sockets may be problematic. Also see: http://www.potaroo.net/ietf/idref/draft-hubert-dns-anti-spoofing/