From 47d6979ac379dfb8044a28d5bfa9a72facccdb30 Mon Sep 17 00:00:00 2001 From: smbaker Date: Thu, 25 Jul 2013 07:14:57 -0700 Subject: [PATCH] start at subnet #1 --- planetstack/core/models/network.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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<