Changeset 363
- Timestamp:
- 07/11/12 13:35:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tiny-import.pl
r362 r363 143 143 } 144 144 145 sub _rdata2hex { 146 my $rdata = shift; 147 my $tmpout = ''; 148 while ($rdata) { 149 my $byte = ''; 150 if ($rdata =~ /^\\/) { 151 ($byte) = ($rdata =~ /^(\\\d{3})/); 152 $byte =~ s/\\/0/; 153 $tmpout .= sprintf("%0.2x", oct($byte)); 154 $rdata =~ s/^\\\d{3}//; 155 } else { 156 ($byte) = ($rdata =~ /^(.)/); 157 $tmpout .= sprintf("%0.2x", ord($byte)); 158 $rdata =~ s/^.//; 159 } 160 } 161 return $tmpout; 162 } 163 145 164 146 165 sub recslurp { … … 523 542 } elsif ($type == 44) { 524 543 # SSHFP 544 my $sshfp = _byteparse(\$rdata, 1); 545 $sshfp .= " "._byteparse(\$rdata, 1); 546 $sshfp .= " "._rdata2hex($rdata); 547 548 # these do not make sense in a reverse zone, since they're logically attached to an A record 549 my $domid = DNSDB::_hostparent($dbh, $fqdn); 550 if ($domid) { 551 $recsth->execute($domid, 0, $fqdn, 44, $sshfp, 0, 0, 0, $ttl); 552 } else { 553 push @deferred, $rec unless $nodefer; 554 } 525 555 526 556 } else {
Note:
See TracChangeset
for help on using the changeset viewer.