Changeset 518


Ignore:
Timestamp:
06/07/13 18:41:45 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Use -1 to flag records to use tinydns' auto-TTL (mis?)feature.
Records appear to have a 1-day TTL when configured this way.

0 is required for records that really truly have a 0 TTL.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r517 r518  
    49154915
    49164916        # support tinydns' auto-TTL
    4917         $ttl = '' if $ttl == '0';
     4917        $ttl = '' if $ttl == -1;
    49184918
    49194919        # Spaces are evil.
     
    49994999
    50005000        # support tinydns' auto-TTL
    5001         $ttl = '' if $ttl == '0';
     5001        $ttl = '' if $ttl == -1;
    50025002
    50035003        _printrec_tiny(*ZONECACHE, 'y', \%recflags, $revzone,
  • trunk/tiny-import.pl

    r496 r518  
    263263      $host =~ s/^=//;
    264264      $host =~ s/\.$//;
    265       $ttl = 0 if !$ttl;
     265      $ttl = -1 if !$ttl;
    266266      $stamp = '' if !$stamp;
    267267      $loc = '' if !$loc;
     
    290290      $host =~ s/\.$//;
    291291      $host =~ s/^\\052/*/;
    292       $ttl = 0 if !$ttl;
     292      $ttl = -1 if !$ttl;
    293293      $stamp = '' if !$stamp;
    294294      $loc = '' if !$loc;
     
    324324      $ns =~ s/\.$//;
    325325      $ns = "$ns.ns.$zone" if $ns !~ /\./;
    326       $ttl = 0 if !$ttl;
     326      $ttl = -1 if !$ttl;
    327327      $stamp = '' if !$stamp;
    328328      $loc = '' if !$loc;
     
    358358      $rip =~ s/^\^//;
    359359      $rip =~ s/\.$//;
    360       $ttl = 0 if !$ttl;
     360      $ttl = 1 if !$ttl;
    361361      $stamp = '' if !$stamp;
    362362      $loc = '' if !$loc;
     
    389389      $host =~ s/\.$//;
    390390      $host =~ s/^\\052/*/;
    391       $ttl = 0 if !$ttl;
     391      $ttl = -1 if !$ttl;
    392392      $stamp = '' if !$stamp;
    393393      $loc = '' if !$loc;
     
    410410      $master =~ s/\.$//;
    411411      $contact =~ s/\.$//;
    412       $ttl = 0 if !$ttl;
     412      $ttl = -1 if !$ttl;
    413413      $stamp = '' if !$stamp;
    414414      $loc = '' if !$loc;
     
    436436      $host =~ s/\.$//;
    437437      $host = "$host.mx.$zone" if $host !~ /\./;
    438       $ttl = 0 if !$ttl;
     438      $ttl = -1 if !$ttl;
    439439      $stamp = '' if !$stamp;
    440440      $loc = '' if !$loc;
     
    461461      $fqdn =~ s/^\\052/*/;
    462462      _deoctal(\$rdata);
    463       $ttl = 0 if !$ttl;
     463      $ttl = -1 if !$ttl;
    464464      $stamp = '' if !$stamp;
    465465      $loc = '' if !$loc;
     
    488488      $ns =~ s/\.$//;
    489489      $ns = "$ns.ns.$fqdn" if $ns !~ /\./;
    490       $ttl = 0 if !$ttl;
     490      $ttl = -1 if !$ttl;
    491491      $stamp = '' if !$stamp;
    492492      $loc = '' if !$loc;
     
    556556      $fqdn =~ s/\.$//;
    557557      $fqdn =~ s/^\\052/*/;
    558       $ttl = 0 if !$ttl;
     558      $ttl = -1 if !$ttl;
    559559      $stamp = '' if !$stamp;
    560560      $loc = '' if !$loc;
Note: See TracChangeset for help on using the changeset viewer.