Changeset 404
- Timestamp:
- 05/11/10 18:05:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r402 r404 704 704 } # end alloctype general case 705 705 706 ##TEMP 707 ## Temporary wrapper to "properly" deallocate sIP PPPoE/DSL "netblocks" in 209.91.185.0/24 708 ## Note that we should really general-case this. 709 my $staticpool = new NetAddr::IP "209.91.185.0/24"; 710 ##TEMP 711 if ($cidr->within($staticpool)) { 712 ##TEMP 713 # We've already deleted the block, now we have to stuff its IPs into the pool. 714 my $sth2 = $dbh->prepare("insert into poolips values ('209.91.185.0/24',?,'6750400','Sudbury','di','y','','','')"); 715 $sth2->execute($cidr->addr); 716 foreach my $ip ($cidr->hostenum) { 717 $sth2->execute("$ip"); 718 } 719 $cidr--; 720 $sth2->execute($cidr->addr); 721 722 ##TEMP 723 } else { 724 ##TEMP 725 706 726 # Now we look for larger-or-equal-sized free blocks in the same master (routed) 707 727 # (super)block. If there aren't any, we can't combine blocks anyway. If there … … 751 771 } 752 772 $sth->execute; 773 774 ##TEMP 775 } 776 ##TEMP 753 777 754 778 # If we got here, we've succeeded. Whew!
Note:
See TracChangeset
for help on using the changeset viewer.