Changeset 436 for trunk/DNSDB.pm


Ignore:
Timestamp:
10/30/12 12:18:50 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix bug in AXFR import (couldn't import as inactive)
Extend AXFR import to allow overriding TTLs. Note this is all-or-nothing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r429 r436  
    41584158  my $zone = shift;
    41594159  my $group = shift;
    4160   my $status = shift || 1;
     4160  my $status = shift;
     4161  $status = (defined($status) ? $status : 0);   # force sane semantics, and allow passing "null" (inactive) status
    41614162  my $rwsoa = shift || 0;
    41624163  my $rwns = shift || 0;
     4164  my $newttl = shift;
    41634165  my $merge = shift || 0;       # do we attempt to merge A/AAAA and PTR records whenever possible?
    41644166                                # do we overload this with the fixme below?
     
    43164318      my $type = $rr->type;
    43174319      my $host = $rr->name;
    4318       my $ttl = $rr->ttl;
     4320      my $ttl = ($newttl ? $newttl : $rr->ttl); # allow force-override TTLs
    43194321
    43204322      $soaflag = 1 if $type eq 'SOA';
Note: See TracChangeset for help on using the changeset viewer.