That is good.<br>I do like the idea of the dummy header.<br><br>Please can you put that on trunk so we can persuade it to test clean using Net::DNS::SEC 0.16<br><br><br clear="all"><div><div dir="ltr">Dick Franks<br><br>--<br>
</div></div>
<br><br><div class="gmail_quote">On 18 July 2013 13:14, Willem Toorop <span dir="ltr"><<a href="mailto:willem@nlnetlabs.nl" target="_blank">willem@nlnetlabs.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks. To make tests succeed with Net::DNS::SEC 0.16, I also had to put<br>
in a dummy header into Packet:<br>
<br>
--- Packet.pm 2013-07-18 13:39:10.870079091 +0200<br>
+++ Packet.pm 2013-07-18 13:41:42.598078205 +0200<br>
@@ -67,6 +67,7 @@<br>
additional => []}, $class;<br>
<br>
$self->{question} = [Net::DNS::Question->new(@_)] if scalar @_;<br>
+ $self->{header} = {}; # Backw. compatibility with Net::DNS::SEC<br>
<br>
$self->header->rd(1);<br>
return $self;<br>
@@ -126,7 +127,8 @@<br>
answer => [],<br>
authority => [],<br>
additional => [],<br>
- answersize => length $$data<br>
+ answersize => length $$data,<br>
+ header => {} # BW compat. with Net::DNS::SEC<br>
}, $class;<br>
<br>
# question/zone section<br>
<br>
I also added some more default initializations for status:<br>
<br>
--- Header.pm.orig 2013-07-18 14:07:07.778069322 +0200<br>
+++ Header.pm 2013-07-18 13:54:13.878073831 +0200<br>
@@ -139,7 +139,7 @@<br>
sub opcode {<br>
my $self = shift;<br>
my $xpkt = $self->{xbody};<br>
- for ( $xpkt->{status} ) {<br>
+ for ( $xpkt->{status} ||= 0 ) {<br>
return opcodebyval(( $_ >> 11) & 0x0f) unless scalar @_;<br>
my $opcode = opcodebyname(shift);<br>
$_ = ( $_ & 0x87ff ) | ( $opcode << 11 );<br>
@@ -160,7 +160,7 @@<br>
sub rcode {<br>
my $self = shift;<br>
my $xpkt = $self->{xbody};<br>
- for ( $xpkt->{status} ) {<br>
+ for ( $xpkt->{status} ||= 0 ) {<br>
my $arg = shift;<br>
my $opt = $self->edns;<br>
unless ( defined $arg ) {<br>
<br>
Do you agree?<br>
<br>
-- Willem<br>
<br>
Op 18-07-13 12:59, Dick Franks schreef:<br>
<div class="HOEnZb"><div class="h5">> Willem,<br>
><br>
> Attached tarball patches Header and Packet to solve memory leak.<br>
> I am still looking at the implications for Net::DNS::SEC<br>
><br>
> Dick Franks<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
net-dns-users mailing list<br>
<a href="mailto:net-dns-users@nlnetlabs.nl">net-dns-users@nlnetlabs.nl</a><br>
<a href="https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users" target="_blank">https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users</a><br>
</div></div></blockquote></div><br>