Fixed issue where new External Network could not be created due to overlap with settled Reservation

This commit is contained in:
Matthew Garrett 2024-11-08 21:29:12 -08:00
Родитель d272eef062
Коммит bd09d0ddd6
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1815,7 +1815,7 @@ async def create_external_network(
block_net_cidrs += prefixes
block_set = IPSet(block_net_cidrs)
resv_set = IPSet(x['cidr'] for x in target_block['resv'])
resv_set = IPSet(x['cidr'] for x in target_block['resv'] if not x['settledOn'])
external_set = IPSet(x['cidr'] for x in target_block['externals'])
available_set = IPSet([target_block['cidr']]) ^ (resv_set | external_set | block_set)