From: smbaker Date: Thu, 25 Jul 2013 14:14:57 +0000 (-0700) Subject: start at subnet #1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=47d6979ac379dfb8044a28d5bfa9a72facccdb30;p=plstackapi.git start at subnet #1 --- diff --git a/planetstack/core/models/network.py b/planetstack/core/models/network.py index be13ea7..1ea7115 100644 --- a/planetstack/core/models/network.py +++ b/planetstack/core/models/network.py @@ -12,13 +12,15 @@ SUBNET_NODE_BITS = 12 # enough for 4096 bits per subnet SUBNET_SUBNET_BITS = 12 # enough for 4096 private networks def find_unused_subnet(base, subnet_bits, node_bits, existing_subnets): - i=0 + # start at the first allocatable subnet + i=1 while True: - subnet_i = (i<