Changeset 674 for trunk/cgi-bin
- Timestamp:
- 01/14/15 12:58:58 (10 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r671 r674 99 99 our $revgroup = 1; # should probably be configurable somewhere 100 100 our $rpccount = 0; 101 102 # Largest inverse CIDR mask length to show per-IP rDNS list 103 # (eg, NetAddr::IP->bits - NetAddr::IP->masklen) 104 our $maxrevlist = 5; # /27 101 105 102 106 ## -
trunk/cgi-bin/MyIPDB.pm
r667 r674 72 72 #$IPDB::rpc_url = 'http://dnsadmin.example.com/dns-rpc.cgi'; 73 73 74 # Largest inverse CIDR mask length to show per-IP rDNS list 75 # (eg, NetAddr::IP->bits - NetAddr::IP->masklen) 76 # allowing longer than a /27 is probably going to slow things down; longer than /29 will scroll. 77 #$IPDB::maxrevlist = 8; # v4 /24 78 74 79 ## connectDB_My() 75 80 # Wrapper for IPDB::connectDB -
trunk/cgi-bin/main.cgi
r665 r674 462 462 } # check for freeblocks assignment or IPDB-controlled assignment 463 463 464 # Generate the IP list for the new allocation in case someone wants to set per-IP rDNS right away. 465 # We don't do this on the previous page because we don't know how big a block or even what IP range 466 # it's for (if following the "normal" allocation process) 467 if ($IPDBacl{$authuser} =~ /c/ 468 && $cidr->masklen != $cidr->bits 469 && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist 470 && $webvar{alloctype} !~ /^.[dpi]/ 471 # do we want to allow v6 at all? 472 #&& ! $cidr->{isv6} 473 ) { 474 my @list; 475 foreach my $ip (@{$cidr->splitref()}) { 476 my %row; 477 $row{r_ip} = $ip->addr; 478 $row{iphost} = ''; 479 push @list, \%row; 480 } 481 $page->param(r_iplist => \@list); 482 # We don't use this here, because these IPs should already be bare. 483 # ... or should we be paranoid? Make it a config option? 484 #getRDNSbyIP($ip_dbh, type => $webvar{alloctype}, range => "$cidr", user => $authuser) ); 485 } 464 486 } # if ($webvar{alloctype} =~ /^.i$/) 465 487
Note:
See TracChangeset
for help on using the changeset viewer.