Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
9 client/htdocs/zone.cgi
@@ -609,7 +609,7 @@ sub display_zone_records {
# shorten the max width of the address field (workaround for
# display formatting problem with DomainKey entries.
- if ( length $r_record->{address} > 48 ) {
+ if ( length $r_record->{address} > 45 ) {
if ( $r_record->{type} =~ /^(?:DNSKEY|RRSIG)$/ ) {
$r_record->{title} = $r_record->{address};
$r_record->{address} = substr($r_record->{address}, 0, 35) . ' ...<br>(tip: hover over address)';
@@ -622,12 +622,15 @@ sub display_zone_records {
my $max = 0;
my @lines = ();
while ( $max < length $r_record->{address} ) {
- push @lines, substr( $r_record->{address}, $max, 48 );
- $max += 48;
+ push @lines, substr( $r_record->{address}, $max, 40 );
+ $max += 40;
}
$r_record->{address} = join "<br>", @lines;
};
}
+ if ( $r_record->{type} eq 'IPSECKEY' ) {
+ $r_record->{description} = substr( $r_record->{description}, 0, 10 ) . ' ...';
+ };
if ( $r_record->{type} eq 'AAAA' ) {
$r_record->{address} =~ s/:[0]+/:/g; # compress leading zeros
View
7 server/lib/NicToolServer/Export/tinydns.pm
@@ -468,7 +468,7 @@ sub zr_ipseckey {
# http://www.faqs.org/rfcs/rfc4025.html
# IN IPSECKEY ( precedence gateway-type algorithm gateway base64-public-key )
- my $rdata = $self->escape_rdata( pack('nnn',
+ my $rdata = $self->escape_rdata( pack('CCC',
$r->{weight}, # Precedence 1 octet
$r->{priority}, # Gateway Type 1 octet, see Gateway
$r->{other}, # Algorithm Type 1 octet, 0=none, 1-DSA, 2=RSA
@@ -499,8 +499,9 @@ sub zr_ipseckey {
};
# Public Key optional, base 64 encoded
- my $public_key = $r->{description};
- $rdata .= $self->escape_rdata( $public_key ) if $public_key;
+ if ( $r->{description} ) {
+ $rdata .= $self->escape_rdata( decode_base64( $r->{description} ) );
+ };
return $self->zr_generic( 45, $r, $rdata );
};
View
19 server/t/22_export.t
@@ -73,6 +73,7 @@ _zr_rrsig();
_aaaa_to_ptr();
_datestamp_to_int();
_zr_nsec3();
+_zr_ipseckey();
done_testing() and exit;
@@ -184,3 +185,21 @@ sub _zr_nsec3 {
', 'zr_nsec3');
};
+
+
+sub _zr_ipseckey {
+ $r = $export->{export_class}->zr_ipseckey( {
+ name => 'ipsec.simerson.com.',
+ weight => 1, # precedence
+ priority => 3, # gateway type
+ other => 2, # algorithm
+ address => 'matt.simerson.net.', # gateway
+ description => '0sAQPeOwAGDPLrDebL1q5Lg8XW9B/d9MnxqlzIYKXhvZPWEHNYGP7AwA RT/tmkeDNn7HPMtgM6GIwQ4p0KGLfSRoUKbjtPlRVeWYLbsnNXeFU5bc hyYef0efYiKlxZdo', # public key
+ ttl => '86400',
+ timestamp => '',
+ location => '',
+ } );
+ cmp_ok( $r, 'eq', ':ipsec.simerson.com.:45:\001\003\002\004matt\010simerson\003net\000\322\300\020\075\343\260\000\140\317.\260\336l\275j\344\270\074\135oA\375\337L\237\032\245\314\206\012\136\033\331\075a\0075\201\217\354\014\000E\077\355\232G\2036\176\307\074\313\1403\241\210\301\016\051\320\241\213\175\044hP\246\343\264\371QU\345\230-\273\0475w\205S\226\334\207\046\036\177G\237b\042\245\305\227h:86400::
+', 'zr_ipseckey');
+
+};

No commit comments for this range

Something went wrong with that request. Please try again.