|
@@ -65,6 +65,13 @@ class IPSubnet(models.Model):
|
|
|
pool = IPSet([self.ip_pool.inet])
|
|
|
used = IPSet((s.inet for s in self.ip_pool.ipsubnet_set.all()))
|
|
|
free = pool.difference(used)
|
|
|
+ free = free.difference(IPSet([
|
|
|
+ IPNetwork('89.234.141.0/31'),
|
|
|
+ IPAddress('2a00:5881:8100:0100::0'),
|
|
|
+ IPAddress('2a00:5881:8100:0100::1'),
|
|
|
+ IPNetwork('2a00:5881:8118:0000::/56'),
|
|
|
+ IPNetwork('2a00:5881:8118:0100::/56'),
|
|
|
+ ]))
|
|
|
# Generator for efficiency (we don't build the whole list)
|
|
|
available = (p for p in free.iter_cidrs() if p.prefixlen <= self.ip_pool.default_subnetsize)
|
|
|
# TODO: for IPv4, get rid of the network and broadcast
|