Changeset 362 for trunk


Ignore:
Timestamp:
07/10/12 17:55:24 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Checkpoint tiny-import.pl

  • Fill in stub for semiobscure RP records (found in test data)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tiny-import.pl

    r361 r362  
    497497      } elsif ($type == 17) {
    498498        # RP
     499        my ($email, $txtrec) = split /\\000/, $rdata;
     500        $email =~ s/\\\d{3}/./g;
     501        $email =~ s/^\.//;
     502        $txtrec =~ s/\\\d{3}/./g;
     503        $txtrec =~ s/^\.//;
     504
     505        # these might actually make sense in a reverse zone...  sort of.
     506        if ($fqdn =~ /\.arpa$/) {
     507          ($code,$msg) = DNSDB::_zone2cidr($fqdn);
     508          my ($rparent) = $dbh->selectrow_array("SELECT rdns_id FROM revzones WHERE revnet >> ?", undef, ($msg));
     509          if ($rparent) {
     510            $recsth->execute(0, $rparent, "$email $txtrec", 17, "$msg", 0, 0, 0, $ttl);
     511          } else {
     512            push @deferred, $rec unless $nodefer;
     513          }
     514        } else {
     515          my $domid = DNSDB::_hostparent($dbh, $fqdn);
     516          if ($domid) {
     517            $recsth->execute($domid, 0, $fqdn, 17, "$email $txtrec", 0, 0, 0, $ttl);
     518          } else {
     519            push @deferred, $rec unless $nodefer;
     520          }
     521        }
    499522
    500523      } elsif ($type == 44) {
Note: See TracChangeset for help on using the changeset viewer.