Changeset 330


Ignore:
Timestamp:
05/09/12 17:18:23 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Checkpoint, updating export for reverse zones. See #26.

  • Update SOA and NS record export handling to deal correctly with reverse zones
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r329 r330  
    40424042        my ($email, $primary) = (split /:/, $host)[0,1];
    40434043        my ($refresh, $retry, $expire, $min_ttl) = (split /:/, $val)[0,1,2,3];
     4044        if ($revrec eq 'y') {
     4045          $zone = NetAddr::IP->new($zone);
     4046          $zone = _ZONE($zone, 'ZONE', 'r', '.').($zone->{isv6} ? '.ip6.arpa' : '.in-addr.arpa');
     4047        }
    40444048        print $datafile "Z$zone:$primary:$email"."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n";
    40454049
     
    40504054      } elsif ($typemap{$type} eq 'NS') {
    40514055
    4052         print $datafile "\&$host"."::$val:$ttl:$stamp:$loc\n";
     4056        if ($revrec eq 'y') {
     4057          $val = NetAddr::IP->new($val);
     4058          print $datafile '&'._ZONE($val, 'ZONE', 'r', '.').($val->{isv6} ? '.ip6.arpa' : '.in-addr.arpa').
     4059                "::$host:$ttl:$stamp:$loc\n";
     4060        } else {
     4061          print $datafile "\&$host"."::$val:$ttl:$stamp:$loc\n";
     4062        }
    40534063
    40544064      } elsif ($typemap{$type} eq 'AAAA') {
Note: See TracChangeset for help on using the changeset viewer.