Commit a3361773 authored by Łukasz Nowak's avatar Łukasz Nowak

When no address is good for computer, generate new one.

parent a4192971
......@@ -209,7 +209,11 @@ class Computer:
if address_dict['addr'] not in computer_partition_address_list:
return address_dict
return None
# all addresses on interface are for partition, so lets add new one
computer_tap = Tap('compdummy')
computer_tap.createWithOwner('root', attach_to_tap=True)
self.bridge.addTap(computer_tap)
return self.bridge.addAddr()
def send(self, config):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment