Index: branches/stable/cgi-bin/freespace.pl
===================================================================
--- branches/stable/cgi-bin/freespace.pl	(revision 315)
+++ branches/stable/cgi-bin/freespace.pl	(revision 317)
@@ -20,16 +20,18 @@
 $tnumfree = $bigrfree = $bigufree = 0;
 
+$sql = 'select * from freeblocks where ';
 # General counts first
 if ($ARGV[0]) {
-  $sth = $dbh->prepare("select * from freeblocks where maskbits >= $ARGV[0] order by maskbits desc");
-} else {
-  $sth = $dbh->prepare("select * from freeblocks order by maskbits desc");
+  $sql .= 'maskbits >= $ARGV[0] and ';
 }
+$sql .= "not (cidr <<= '192.168.0.0/16') ".
+		"and not (cidr <<= '172.16.0.0/12') ".
+		"and not (cidr <<= '10.0.0.0/8') ";
+$sql .= "order by maskbits desc";
+
+$sth = $dbh->prepare($sql);
 $sth->execute;
 while (@data = $sth->fetchrow_array) {
   # cidr,maskbits,city,routed
-  next if $data[0] =~ /^10\./;
-  #next if $data[0] =~ /^172\.16\./;
-  next if $data[0] =~ /^192\.168\./;
   $tnumfree++;
   $numfree{"$data[1]"}++;
