- Timestamp:
- 03/31/06 17:01:56 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/freespace.pl
r305 r317 20 20 $tnumfree = $bigrfree = $bigufree = 0; 21 21 22 $sql = 'select * from freeblocks where '; 22 23 # General counts first 23 24 if ($ARGV[0]) { 24 $sth = $dbh->prepare("select * from freeblocks where maskbits >= $ARGV[0] order by maskbits desc"); 25 } else { 26 $sth = $dbh->prepare("select * from freeblocks order by maskbits desc"); 25 $sql .= 'maskbits >= $ARGV[0] and '; 27 26 } 27 $sql .= "not (cidr <<= '192.168.0.0/16') ". 28 "and not (cidr <<= '172.16.0.0/12') ". 29 "and not (cidr <<= '10.0.0.0/8') "; 30 $sql .= "order by maskbits desc"; 31 32 $sth = $dbh->prepare($sql); 28 33 $sth->execute; 29 34 while (@data = $sth->fetchrow_array) { 30 35 # cidr,maskbits,city,routed 31 next if $data[0] =~ /^10\./;32 #next if $data[0] =~ /^172\.16\./;33 next if $data[0] =~ /^192\.168\./;34 36 $tnumfree++; 35 37 $numfree{"$data[1]"}++;
Note:
See TracChangeset
for help on using the changeset viewer.