diff --git a/bin/tests/system/resolver/ans8/ans.pl b/bin/tests/system/resolver/ans8/ans.pl index a1a092a1ef..948859d698 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 {