Changeset 495 for trunk/dns-rpc.cgi
- Timestamp:
- 05/03/13 15:36:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns-rpc.cgi
r490 r495 52 52 'dnsdb.getSOA' => \&getSOA, 53 53 'dnsdb.getRecLine' => \&getRecLine, 54 'dnsdb.get DomRecs' => \&getDomRecs,54 'dnsdb.getRecList' => \&getRecList, 55 55 'dnsdb.getRecCount' => \&getRecCount, 56 56 'dnsdb.addRec' => \&addRec, … … 341 341 } 342 342 343 sub get DomRecs{343 sub getRecList { 344 344 my %args = @_; 345 345 … … 353 353 $args{direction} = 'ASC' if !$args{direction}; 354 354 355 my $ret = $dnsdb->get DomRecs(defrec => $args{defrec}, revrec => $args{revrec}, id => $args{id},355 my $ret = $dnsdb->getRecList(defrec => $args{defrec}, revrec => $args{revrec}, id => $args{id}, 356 356 offset => $args{offset}, sortby => $args{sortby}, sortorder => $args{sortorder}, 357 357 filter => $args{filter}); … … 443 443 # We need to strip the CIDR mask on IPv4 /32 assignments, or we just add a new record all the time. 444 444 my $filt = ($cidr->{isv6} || $cidr->masklen != 32 ? "$cidr" : $cidr->addr); 445 my $reclist = $dnsdb->get DomRecs(defrec => 'n', revrec => 'y',445 my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y', 446 446 id => $zonelist->[0]->{rdns_id}, filter => $filt); 447 447 if (scalar(@$reclist) == 0) { … … 477 477 # that spans multiple reverse zones (eg, /23 CIDR -> 2 /24 rzones) 478 478 foreach my $zdata (@$zonelist) { 479 my $reclist = $dnsdb->get DomRecs(defrec => 'n', revrec => 'y',479 my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y', 480 480 id => $zdata->{rdns_id}, filter => $zdata->{revnet}); 481 481 if (scalar(@$reclist) == 0) { … … 527 527 if ($args{delsubs}) { 528 528 # Delete ALL EVARYTHING!!one11!! in $args{cidr} 529 my $reclist = $dnsdb->get DomRecs(defrec => 'n', revrec => 'y', id => $zonelist->[0]->{rdns_id});529 my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y', id => $zonelist->[0]->{rdns_id}); 530 530 foreach my $rec (@$reclist) { 531 531 my $reccidr = new NetAddr::IP $rec->{val}; … … 554 554 # We need to strip the CIDR mask on IPv4 /32 assignments, or we can't find single-IP records 555 555 my $filt = ($cidr->{isv6} || $cidr->masklen != 32 ? "$cidr" : $cidr->addr); 556 my $reclist = $dnsdb->get DomRecs(defrec => 'n', revrec => 'y',556 my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y', 557 557 id => $zonelist->[0]->{rdns_id}, filter => $filt, sortby => 'val', sortorder => 'DESC'); 558 558 foreach my $rec (@$reclist) { … … 582 582 # that spans multiple reverse zones (eg, /23 CIDR -> 2 /24 rzones) 583 583 foreach my $zdata (@$zonelist) { 584 my $reclist = $dnsdb->get DomRecs(defrec => 'n', revrec => 'y', id => $zdata->{rdns_id});584 my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y', id => $zdata->{rdns_id}); 585 585 if (scalar(@$reclist) == 0) { 586 586 # nothing to do? or do we (re)add a record based on the parent?
Note:
See TracChangeset
for help on using the changeset viewer.