Changeset 102


Ignore:
Timestamp:
12/07/04 17:56:43 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

TEMPORARY change to "properly" deallocate static IP blocks
from 209.91.185.0/24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r101 r102  
    15541554      } # end alloctype general case
    15551555
     1556##TEMP
     1557## Temporary wrapper to "properly" deallocate sIP PPPoE/DSL "netblocks" in 209.91.185.0/24
     1558my $staticpool = new NetAddr::IP "209.91.185.0/24";
     1559##TEMP
     1560if ($cidr->within($staticpool)) {
     1561##TEMP
     1562  # We've already deleted the block, now we have to stuff its IPs into the pool.
     1563  $sth = $ip_dbh->prepare("insert into poolips values ('209.91.185.0/24',?,'6750400','','d','y','','','')");
     1564  $sth->execute($cidr->addr);
     1565  foreach my $ip ($cidr->hostenum) {
     1566    $sth->execute("$ip");
     1567  }
     1568  $cidr--;
     1569  $sth->execute($cidr->addr);
     1570
     1571##TEMP
     1572} else {
     1573##TEMP
     1574
    15561575      # Now we look for larger-or-equal-sized free blocks in the same master (routed)
    15571576      # (super)block. If there aren't any, we can't combine blocks anyway.  If there
     
    15991618      $sth->execute;
    16001619
     1620##TEMP
     1621}
     1622##TEMP
     1623
    16011624      # If we got here, we've succeeded.  Whew!
    16021625      $ip_dbh->commit;
Note: See TracChangeset for help on using the changeset viewer.