Changeset 743
- Timestamp:
- 06/11/15 17:18:44 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r742 r743 2059 2059 2060 2060 my @ret; 2061 my @newfreelist; 2061 2062 eval { 2062 2063 $dbh->do("UPDATE allocations SET cidr = ? WHERE id = ?", undef, $newblock, $id); … … 2064 2065 # find the netblock(s) that are now free 2065 2066 my @workingblocks = $oldblock->split($newblock->masklen); 2066 my @wb2;2067 2067 foreach my $newsub (@workingblocks) { 2068 2068 next if $newsub == $newblock; 2069 push @ wb2, $newsub;2070 } 2071 @ wb2 = Compact(@wb2);2069 push @newfreelist, $newsub; 2070 } 2071 @newfreelist = Compact(@newfreelist); 2072 2072 2073 2073 # set new freeblocks, and clean up any IP pool entries if needed. 2074 foreach my $newfree (@ wb2) {2074 foreach my $newfree (@newfreelist) { 2075 2075 my @clist; 2076 2076 # the block we're munging … … 2093 2093 } 2094 2094 2095 } # $newfree (@ wb2)2095 } # $newfree (@newfreelist) 2096 2096 2097 2097 # additional cleanup on net/gw/bcast IPs in pool
Note:
See TracChangeset
for help on using the changeset viewer.