Do not use Net::DNS::Nameserver in the "serve-stale" system test
Returning undef
from a Net::DNS::Nameserver
ReplyHandler
only prevents sending a response in Net::DNS
0.67+ (see changes introduced in upstream revision 921). In older versions, a response is sent anyway, causing the "serve-stale" system test to fail as it takes advantage of the newer behavior:
$ PORT=5300 PERL5LIB=/path/to/Net-DNS/0.66/lib perl bin/tests/system/serve-stale/ans2/ans.pl > /dev/null 2>&1 &
$ dig @10.53.0.2 -p 5300 disable txt +short
"0"
$ dig @10.53.0.2 -p 5300 ns.example +short
$ kill $!
$ PORT=5300 PERL5LIB=/path/to/Net-DNS/0.67/lib perl bin/tests/system/serve-stale/ans2/ans.pl > /dev/null 2>&1 &
$ dig @10.53.0.2 -p 5300 disable txt +short
"0"
$ dig @10.53.0.2 -p 5300 ns.example +short
; <<>> DiG 9.13.2 <<>> @10.53.0.2 -p 5300 ns.example +short
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
Since the latest Net::DNS
version available with stock RHEL/CentOS 6 packages is 0.65 and we officially support that operating system, bin/tests/system/serve-stale/ans2/ans.pl
should be reworked not to use Net::DNS::Nameserver
to ensure it behaves consistently across all Net::DNS
versions.