dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
399 stars 66 forks source link

Fix another get_next_network() assigned bug #252

Closed nickpegg closed 7 years ago

nickpegg commented 7 years ago

It turns out that my fix in #250 didn't cover all cases where a network in the assigned state would be considered. If a network is in a not-busy state but did not have a prefix-length that matched what we're looking for, it would never get checked to see if it overlaps with candidate subnets.

This fixes that problem by modifying children to be all children instead of all the ones in a not-busy state, since children is what we check candidate subnets against looking for overlaps.