Ignore:
Timestamp:
12/27/06 11:13:46 (18 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Fix lurking buglet in deallocation of static IPs.

If the admin interface (or direct DB manipulation) were used to create an
IP pool within another block, deallocation would fail because the SQL
statement came up with 2 results where it would otherwise only have found 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/IPDB.pm

    r337 r354  
    492492      $msg = "Unable to deallocate $disp_alloctypes{$type} $cidr";
    493493      $sth = $dbh->prepare("update poolips set custid='6750400',available='y',".
    494         "city=(select city from allocations where cidr >>= '$cidr'),".
     494        "city=(select city from allocations where cidr >>= '$cidr'".
     495        " order by masklen(cidr) desc limit 1),".
    495496        "description='',notes='',circuitid='' where ip='$cidr'");
    496497      $sth->execute;
Note: See TracChangeset for help on using the changeset viewer.