Changeset 586 for trunk/cgi-bin
- Timestamp:
- 01/17/13 15:47:14 (12 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r585 r586 1462 1462 } elsif ($btype =~ /^.i$/) { 1463 1463 my $binfo = $dbh->selectrow_hashref("SELECT ip AS block, custid, type, city, circuitid, description,". 1464 " notes, modifystamp AS lastmod, privdata, vrf, pool, rdepth ".1464 " notes, modifystamp AS lastmod, privdata, vrf, pool, rdepth, rdns". 1465 1465 " FROM poolips WHERE ip = ?", undef, ($block) ); 1466 1466 # " FROM poolips WHERE ip = ? AND vrf = ?", undef, ($block, $vrf) ); … … 1468 1468 } else { 1469 1469 my $binfo = $dbh->selectrow_hashref("SELECT cidr AS block, parent, custid, type, city, circuitid, ". 1470 "description, notes, modifystamp AS lastmod, privdata, vrf, swip, rdepth ".1470 "description, notes, modifystamp AS lastmod, privdata, vrf, swip, rdepth, rdns". 1471 1471 " FROM allocations WHERE cidr = ? AND rdepth = ?", undef, ($block, $rdepth) ); 1472 1472 # " FROM allocations WHERE cidr = ? AND rdepth = ? AND vrf = ?", undef, ($block, $rdepth, $vrf) ); … … 1502 1502 # or sub-/19 /24 to retrieve - it's the least-wrong way to do things. 1503 1503 1504 my ($rpcblock) = $cidr->split( ($cidr->masklen <= 16 ? 16 : 24) ); 1504 my ($rpcblock) = ($cidr->masklen <= 24 ? $cidr->split( ($cidr->masklen <= 16 ? 16 : 24) ) : $cidr); 1505 1505 1506 my %rpcargs = ( 1506 1507 rpcuser => $args{user}, 1507 rpcsystem => 'ipdb',1508 1508 group => $revgroup, # not sure how this could sanely be exposed, tbh... 1509 1509 cidr => "$rpcblock", 1510 1510 ); 1511 1511 1512 eval { 1513 $result = $server->call('dnsdb.getRevPattern', %rpcargs); 1514 }; 1515 if ($@) { 1516 my $msg = $@; 1517 $msg =~ s/Fault returned from XML RPC Server, fault code 4: error executing RPC `dnsdb.addRDNS'\.\s//; 1518 } 1512 $rdns = _rpc('getRevPattern', %rpcargs); 1519 1513 } 1520 1514 -
trunk/cgi-bin/main.cgi
r585 r586 654 654 $blockinfo->{type} =~ s/\s//; 655 655 656 # Get rDNS info; duplicates a bit of getBlockData but also does the RPC call if possible 657 $blockinfo->{rdns} = getBlockRDNS($ip_dbh, $webvar{block}, $webvar{rdepth}, user => $authuser); 658 656 659 $page->param(block => $webvar{block}); 660 $page->param(rdns => $blockinfo->{rdns}); 657 661 $page->param(rdepth => $blockinfo->{rdepth}); 658 662
Note:
See TracChangeset
for help on using the changeset viewer.