Index: /trunk/cgi-bin/main.cgi
===================================================================
--- /trunk/cgi-bin/main.cgi	(revision 749)
+++ /trunk/cgi-bin/main.cgi	(revision 750)
@@ -873,4 +873,5 @@
   # snag block info from db
   my $blockinfo = getBlockData($ip_dbh, $webvar{id}, $webvar{basetype});
+  my $cidr = new NetAddr::IP $blockinfo->{block};
   $page->param(id       => $webvar{id});
   $page->param(basetype => $webvar{basetype});
@@ -887,24 +888,26 @@
   $blockinfo->{type} =~ s/\s//;
 
-  my $cached;
-  # Get rDNS info;  duplicates a bit of getBlockData but also does the RPC call if possible
-  ($blockinfo->{rdns},$cached) = getBlockRDNS($ip_dbh, id => $webvar{id}, type => $blockinfo->{type}, user => $authuser);
-  # visual flag that we're working IPDB-local, not off more authoritative data in dnsadmin
-  $page->param(cached   => $cached);
-
-  my $cidr = new NetAddr::IP $blockinfo->{block};
-  # Limit the per-IP rDNS list based on CIDR length;  larger ones just take up too much space.
-  # Also, don't show on IP pools;  the individual IPs will have a space for rDNS
-  # Don't show on single IPs;  these use the "pattern" field
-  if ($IPDBacl{$authuser} =~ /c/
-      && $cidr->masklen != $cidr->bits
-      && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist
-      && $blockinfo->{type} !~ /^.[dpi]/
-      # do we want to allow v6 at all?
-      #&& ! $cidr->{isv6}
-      ) {
-    $page->param(r_iplist => getRDNSbyIP($ip_dbh, id => $webvar{id}, type => $blockinfo->{type},
-	range => $blockinfo->{block}, user => $authuser) );
-  }
+  if ($blockinfo->{revzone}) {
+    $page->param(revzone => $blockinfo->{revzone});
+    my $cached;
+    # Get rDNS info;  duplicates a bit of getBlockData but also does the RPC call if possible
+    ($blockinfo->{rdns},$cached) = getBlockRDNS($ip_dbh, id => $webvar{id}, type => $blockinfo->{type}, user => $authuser);
+    # visual flag that we're working IPDB-local, not off more authoritative data in dnsadmin
+    $page->param(cached   => $cached);
+
+    # Limit the per-IP rDNS list based on CIDR length;  larger ones just take up too much space.
+    # Also, don't show on IP pools;  the individual IPs will have a space for rDNS
+    # Don't show on single IPs;  these use the "pattern" field
+    if ($IPDBacl{$authuser} =~ /c/
+        && $cidr->masklen != $cidr->bits
+        && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist
+        && $blockinfo->{type} !~ /^.[dpi]/
+        # do we want to allow v6 at all?
+        #&& ! $cidr->{isv6}
+        ) {
+      $page->param(r_iplist => getRDNSbyIP($ip_dbh, id => $webvar{id}, type => $blockinfo->{type},
+          range => $blockinfo->{block}, user => $authuser) );
+    }
+  } # rDNS availability check
 
   # consider extending this to show time as well as date
