[dnssec-tools: 3/4] the new patch

Wes Hardaker hardaker at fedoraproject.org
Wed Jan 22 18:24:32 UTC 2014


commit 1bc3d88d440313a2c085e6f4fa4842aa9c0095f4
Author: Wes Hardaker <opensource at hardakers.net>
Date:   Wed Jan 22 10:24:06 2014 -0800

    the new patch

 dnssec-tools-zonefile-fast-nsec3-fixes.patch |   40 ++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/dnssec-tools-zonefile-fast-nsec3-fixes.patch b/dnssec-tools-zonefile-fast-nsec3-fixes.patch
new file mode 100644
index 0000000..c49e956
--- /dev/null
+++ b/dnssec-tools-zonefile-fast-nsec3-fixes.patch
@@ -0,0 +1,40 @@
+diff --git a/dnssec-tools/tools/modules/ZoneFile-Fast/Fast.pm b/dnssec-tools/tools/modules/ZoneFile-Fast/Fast.pm
+index cc9c6d3..3bc9a70 100644
+--- a/dnssec-tools/tools/modules/ZoneFile-Fast/Fast.pm
++++ b/dnssec-tools/tools/modules/ZoneFile-Fast/Fast.pm
+@@ -1335,7 +1335,20 @@ sub parse_tlsa
+ sub parse_nsec3
+   {
+       #got more data
+-      if ( /\G\s*((\w+\s+)*)\)\s*$/) {
++      if ( /\G\s*([A-Z0-9]{32})\s*(\))?/gc) {
++         my $nxthash = $1;
++	 my $binhash = MIME::Base32::decode(uc($nxthash));
++         $nsec3->{ 'hnxtname' } = $nxthash;
++         $nsec3->{ 'hnxtnamebin' } = $binhash;
++         $nsec3->{ 'hashlength' } = length( $binhash );
++         if ( defined($2) && $2 eq ')' ) {	# Was RR terminated ?
++	    push @zone, $nsec3; 
++	    # we're done
++	    $parse = \&parse_line;
++            $nsec3 = undef;
++         }
++      } elsif ( /\G\s+$/gc ) {			# Empty line
++      } elsif ( /\G\s*((\w+\s+)*)\)\s*$/) {
+          my $typelist = $1;
+ 	 $typelist = join(" ",sort split(/\s+/,$typelist));
+          $nsec3->{ 'typelist' } = $typelist;
+@@ -1345,13 +1358,6 @@ sub parse_nsec3
+ 	 # we're done
+ 	 $parse = \&parse_line;
+          $nsec3 = undef;
+-      } elsif ( /\G\s*([A-Z0-9]{32})\s*$/gc) {
+-         my $nxthash = $1;
+-	 my $binhash = MIME::Base32::decode(uc($nxthash));
+-         $nsec3->{ 'hnxtname' } = $nxthash;
+-         $nsec3->{ 'hnxtnamebin' } = $binhash;
+-         $nsec3->{ 'hashlength' } = length( $binhash );
+-      } elsif ( /\G\s+$/gc ) {			# Empty line
+       } else {
+          error( "bad NSEC3 continuation lines ($_)" );
+       } 


More information about the scm-commits mailing list