- Timestamp:
- 01/18/05 13:13:14 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r125 r126 476 476 } # end alloctype general case 477 477 478 ##TEMP 479 ## Temporary wrapper to "properly" deallocate sIP PPPoE/DSL "netblocks" in 209.91.185.0/24 480 ## Note that we should really general-case this. 481 my $staticpool = new NetAddr::IP "209.91.185.0/24"; 482 ##TEMP 483 if ($cidr->within($staticpool)) { 484 ##TEMP 485 # We've already deleted the block, now we have to stuff its IPs into the pool. 486 $sth = $ip_dbh->prepare("insert into poolips values ('209.91.185.0/24',?,'6750400','Sudbury','d','y',''$ 487 $sth->execute($cidr->addr); 488 foreach my $ip ($cidr->hostenum) { 489 $sth->execute("$ip"); 490 } 491 $cidr--; 492 $sth->execute($cidr->addr); 493 494 ##TEMP 495 } else { 496 ##TEMP 497 478 498 # Now we look for larger-or-equal-sized free blocks in the same master (routed) 479 499 # (super)block. If there aren't any, we can't combine blocks anyway. If there … … 521 541 $sth->execute; 522 542 543 ##TEMP 544 } 545 ##TEMP 546 523 547 # If we got here, we've succeeded. Whew! 524 548 $dbh->commit;
Note:
See TracChangeset
for help on using the changeset viewer.