From: Michał Kępień Date: Mon, 9 Jul 2018 10:57:23 +0000 (+0200) Subject: Fix a Net::DNS version quirk in the "resolver" system test X-Git-Tag: v9.13.3~123^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c3c6aea372ef25e5e74e853e46f596e53a5bf25;p=thirdparty%2Fbind9.git Fix a Net::DNS version quirk in the "resolver" system test Net::DNS versions older than 0.68 insert a ./ANY RR into the QUESTION section if the latter is empty. 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 behave consistently for various Net::DNS versions. Ensure that by making handleUDP() return the query ID and flags generated by Net::DNS with 8 zero bytes appended. --- diff --git a/bin/tests/system/resolver/ans8/ans.pl b/bin/tests/system/resolver/ans8/ans.pl index a1a092a1ef3..948859d6985 100644 --- a/bin/tests/system/resolver/ans8/ans.pl +++ b/bin/tests/system/resolver/ans8/ans.pl @@ -73,7 +73,11 @@ sub handleUDP { $packet->header->tc(0); } - return $packet->data; + # Net::DNS versions < 0.68 insert an ./ANY RR into the QUESTION section + # if the latter is empty. Make sure Net::DNS version does not + # influence the return value of this function by returning the query ID + # and flags generated by Net::DNS with 8 zero bytes appended. + return substr($packet->data, 0, 4) . "\x00" x 8; } sub handleTCP {