]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
sign_tcp_continuation doesn't work with the newer versions of
authorMark Andrews <marka@isc.org>
Fri, 21 Dec 2012 01:58:58 +0000 (12:58 +1100)
committerMark Andrews <marka@isc.org>
Fri, 21 Dec 2012 01:58:58 +0000 (12:58 +1100)
Net:DNS.  Code has been submitted so we don't need to use
the sign_tcp_continuation hack in future.

bin/tests/system/ans.pl

index 2a5c535fb6e2a2525829603f9bdab19dbf56a0db..d840c1d9215af251acd2912af15477bae5022f5e 100644 (file)
@@ -322,6 +322,7 @@ sub handleTCP {
        # get the existing signature if any, and clear the additional section
        my $prev_tsig;
        my $signer;
+       my $continuation = 0;
        while (my $rr = $request->pop("additional")) {
                if ($rr->type eq "TSIG") {
                        $prev_tsig = $rr;
@@ -371,8 +372,12 @@ sub handleTCP {
                                }
                                
                                $tsig->sign_func($signer) if defined($signer);
+                               $tsig->continuation($continuation)
+                                       if ($Net::DNS::VERSION >= 0.71);
                                $packet->sign_tsig($tsig);
-                               $signer = \&sign_tcp_continuation;
+                               $signer = \&sign_tcp_continuation
+                                       if ($Net::DNS::VERSION < 0.70);
+                               $continuation = 1;
 
                                my $copy =
                                        Net::DNS::Packet->new(\($packet->data));