pygui: fixed interface creation after deletion, fixed issue reusing deleted subnets

This commit is contained in:
Blake Harnden 2020-05-16 23:35:19 -07:00
parent 91220078f1
commit 06e3d84862
5 changed files with 33 additions and 30 deletions

View file

@ -105,12 +105,11 @@ class InterfaceManager:
for interface in interfaces:
subnets = self.get_subnets(interface)
if subnets not in remaining_subnets:
if self.current_subnets == subnets:
self.current_subnets = None
self.used_subnets.pop(subnets.key(), None)
else:
index = get_index(interface)
subnets.used_indexes.discard(index)
self.current_subnets = None
def joined(self, links: List["core_pb2.Link"]) -> None:
interfaces = []