Fix a Net::DNS version quirk in the "resolver" system test
new Net::DNS::Packet()->data()
only returns a DNS packet with an empty QUESTION section in Net::DNS
0.68+ (see changes introduced in upstream revision 968). In older versions, the same method inserted a ./ANY
RR into the QUESTION section if the latter was empty:
$ PERL5LIB=/path/to/Net-DNS/0.67/lib perl -MNet::DNS -e 'print(unpack("H*", new Net::DNS::Packet()->data()) . "\n") for (1..3);'
a027010000010000000000000000ff00ff
3d68010000010000000000000000ff00ff
a740010000010000000000000000ff00ff
$ PERL5LIB=/path/to/Net-DNS/0.68/lib perl -MNet::DNS -e 'print(unpack("H*", new Net::DNS::Packet()->data()) . "\n") for (1..3);'
01be01000000000000000000
85a101000000000000000000
2c1e01000000000000000000
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/resolver/ans8/ans.pl
should be tweaked to ensure it returns consistent responses across all Net::DNS
versions.