bugfix: exception when /32 net exists
authorAlexey Andriyanov <alan@yandex-team.ru>
Thu, 10 Apr 2014 08:45:33 +0000 (12:45 +0400)
committerAlexey Andriyanov <alan@yandex-team.ru>
Thu, 10 Apr 2014 08:45:33 +0000 (12:45 +0400)
new-ip-range.php

index c5bbe44..3990c5c 100644 (file)
@@ -90,7 +90,7 @@ END
 
 function renderNetCellForAlloc ($cell, $needed_mask = NULL)
 {
-       if (empty ($cell['spare_ranges']) and $cell['kidc'] == 0)
+       if (empty ($cell['spare_ranges']) and $cell['kidc'] == 0 and $cell['mask'] < 31)
        {
                $cell['spare_ranges'][$cell['mask'] + 1][] = $cell['ip_bin'];
                $cell['spare_ranges'][$cell['mask'] + 1][] = (ip_last ($cell) & ip4_mask ($cell['mask'] + 1));