- Timestamp:
- 07/31/19 16:44:40 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r775 r776 6510 6510 # host contains pri-ns:responsible 6511 6511 # val is abused to contain refresh:retry:expire:minttl 6512 ##fixme: "manual" serial vs tinydns-autoserial6513 6512 # let's be explicit about abusing $host and $val 6514 6513 my ($email, $primary) = (split /:/, $host)[0,1]; 6515 6514 my ($refresh, $retry, $expire, $min_ttl) = (split /:/, $val)[0,1,2,3]; 6515 my $serial = 0; 6516 6516 if ($revrec eq 'y') { 6517 6517 ##fixme: have to publish SOA records for each v4 /24 in sub-/16, and each /16 in sub-/8 … … 6519 6519 # -> only need SOA for local chunks offset from reverse delegation boundaries, so v6 is fine 6520 6520 # anyone who says they need sub-nibble v6 delegations, at this time, needs their head examined. 6521 ##fixme?: alternate SOA serial schemes? 6522 ($serial) = $self->{dbh}->selectrow_array("SELECT zserial FROM revzones WHERE revnet=?", undef, $zone); 6521 6523 $zone = NetAddr::IP->new($zone); 6522 6524 # handle split-n-multiply SOA for off-octet (8 < mask < 16) or (16 < mask < 24) v4 zones … … 6524 6526 foreach my $szone ($zone->split($zone->masklen + (8 - $zone->masklen % 8))) { 6525 6527 $szone = _ZONE($szone, 'ZONE.in-addr.arpa', 'r', '.'); 6526 print $datafile "Z$szone:$primary:$email "."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n"6528 print $datafile "Z$szone:$primary:$email:$serial:$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n" 6527 6529 or die $!; 6528 6530 } … … 6530 6532 } 6531 6533 $zone = _ZONE($zone, 'ZONE', 'r', '.').($zone->{isv6} ? '.ip6.arpa' : '.in-addr.arpa'); 6532 } 6533 print $datafile "Z$zone:$primary:$email"."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n" 6534 } else { 6535 # just snarfing the right SOA serial for the zone type 6536 ##fixme?: alternate SOA serial schemes? 6537 ($serial) = $self->{dbh}->selectrow_array("SELECT zserial FROM domains WHERE domain=?", undef, $zone); 6538 } # revrec <> 'y' 6539 $serial = '' if !$serial; # suppress a "uninitialized value" warning. empty serial isn't an error, just falls back to tinydns' autoser$ 6540 print $datafile "Z$zone:$primary:$email:$serial:$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n" 6534 6541 or die $!; 6535 6542 } # SOA
Note:
See TracChangeset
for help on using the changeset viewer.