Commit 2bb5fc2e authored by Mark Andrews's avatar Mark Andrews
Browse files

Merge branch '510-resolver-test-was-failing-v9_11' into 'v9_11'

Resolve "Resolver test was failing"

See merge request !742
parents 381ae150 fb0f34cc
Pipeline #4559 passed with stages
in 8 minutes and 5 seconds
......@@ -61,23 +61,15 @@ sub handleUDP {
my $qclass = $questions[0]->qclass;
my $id = $request->header->id;
my $packet = new Net::DNS::Packet();
$packet->header->qr(1);
$packet->header->aa(0);
$packet->header->id($id);
# don't use Net::DNS to construct the header only reply as early
# versions just get it completely wrong.
if ($qname eq "truncated.no-questions") {
$packet->header->tc(1);
} else {
$packet->header->tc(0);
# QR, AA, TC
return (pack("nnnnnn", $id, 0x8600, 0, 0, 0, 0));
}
# 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;
# QR, AA
return (pack("nnnnnn", $id, 0x8400, 0, 0, 0, 0));
}
sub handleTCP {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment