Commit 03958ad4 authored by Mark Andrews's avatar Mark Andrews
Browse files

3442. [port] Net::DNS 0.69 introduced a non backwards compatible

                        change. [RT #32216]
parent b6f22cc3
3442. [port] Net::DNS 0.69 introduced a non backwards compatible
change. [RT #32216]
3441. [maint] D.ROOT-SERVERS.NET is now 199.7.91.13.
3440. [bug] Reorder get_key_struct to not trigger a assertion when
......
......@@ -107,9 +107,16 @@ $SIG{TERM} = \&rmpid;
my @rules;
sub handleUDP {
my ($buf) = @_;
my $request;
my ($request, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
if ($Net::DNS::VERSION > 0.68) {
$request = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($request, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
my @questions = $request->question;
my $qname = $questions[0]->qname;
......@@ -288,9 +295,16 @@ sub sign_tcp_continuation {
sub handleTCP {
my ($buf) = @_;
my $request;
my ($request, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
if ($Net::DNS::VERSION > 0.68) {
$request = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($request, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
my @questions = $request->question;
my $qname = $questions[0]->qname;
......
......@@ -42,8 +42,16 @@ for (;;) {
print "**** request from " , $sock->peerhost, " port ", $sock->peerport, "\n";
my ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
my $packet;
if ($Net::DNS::VERSION > 0.68) {
$packet = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
print "REQUEST:\n";
$packet->print;
......
......@@ -42,8 +42,16 @@ for (;;) {
print "**** request from " , $sock->peerhost, " port ", $sock->peerport, "\n";
my ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
my $packet;
if ($Net::DNS::VERSION > 0.68) {
$packet = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
print "REQUEST:\n";
$packet->print;
......
......@@ -41,8 +41,16 @@ for (;;) {
print "**** request from " , $sock->peerhost, " port ", $sock->peerport, "\n";
my ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
my $packet;
if ($Net::DNS::VERSION > 0.68) {
$packet = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
print "REQUEST:\n";
$packet->print;
......
......@@ -98,9 +98,16 @@ $SIG{TERM} = \&rmpid;
my @rules;
sub handleUDP {
my ($buf) = @_;
my ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
my $packet;
if ($Net::DNS::VERSION > 0.68) {
$packet = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
$packet->header->qr(1);
$packet->header->aa(1);
......@@ -243,9 +250,16 @@ sub sign_tcp_continuation {
sub handleTCP {
my ($buf) = @_;
my ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
my $packet;
if ($Net::DNS::VERSION > 0.68) {
$packet = new Net::DNS::Packet(\$buf, 0);
$@ and die $@;
} else {
my $err;
($packet, $err) = new Net::DNS::Packet(\$buf, 0);
$err and die $err;
}
$packet->header->qr(1);
$packet->header->aa(1);
......
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