Changeset 335


Ignore:
Timestamp:
05/11/12 18:01:27 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Checkpoint filling in processing for PTR template and A+PTR template export

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r334 r335  
    41784178        }
    41794179        _printrec_tiny($datafile,$revrec,$recflags,$zone,$host,$type,$val,$dist,$weight,$port,$ttl,$loc,$stamp);
     4180##fixme: add a config flag to indicate use of the patch from http://www.fefe.de/dns/
     4181# type 6 is for AAAA+PTR, type 3 is for AAAA
    41804182
    41814183      } elsif ($type == 65282) { # PTR template
     4184
     4185        # only useful for v4 with standard DNS software, since this expands all
     4186        # IPs in $zone (or possibly $val?) with autogenerated records
     4187use Data::Dumper;
     4188$zone = NetAddr::IP->new($zone);
     4189if (!$zone->{isv6}) {
     4190  $val = NetAddr::IP->new($val);
     4191  if ($zone == $val) {
     4192    my $iplist = $zone->hostenumref;
     4193    foreach (@$iplist) {
     4194    }
     4195  } else {
     4196  }
     4197}
     4198
     4199# IP substitutions in template records:
     4200#major patterns:
     4201#dashed IP, forward and reverse
     4202#dotted reversed IP (forward is... dumb)
     4203#hex-coded IP
     4204#IP as decimal-coded 32-bit value
     4205#
     4206#minor patterns (per-octet)
     4207#octet
     4208#hex-coded octet
     4209#0-padded octet
     4210
     4211
    41824212      } elsif ($type == 65283) { # A+PTR template
     4213
     4214if (!$zone->{isv6}) {   # Just In Case.  An A+PTR should be impossible to add to a v6 revzone via API.
     4215}
     4216
    41834217      } elsif ($type == 65284) { # AAAA+PTR template
     4218        # Stub for completeness.  Could be exported to DNS software that supports
     4219        # some degree of internal automagic in generic-record-creation
     4220        # (eg http://search.cpan.org/dist/AllKnowingDNS/ )
    41844221
    41854222      } else {
Note: See TracChangeset for help on using the changeset viewer.