Commit 60bf7c18 authored by Alain Takoudjou's avatar Alain Takoudjou

format: fix tap ipv4 configuration after 086504fa

parent b331ab6f
...@@ -607,9 +607,11 @@ class Computer(object): ...@@ -607,9 +607,11 @@ class Computer(object):
partition.tap.createWithOwner(owner) partition.tap.createWithOwner(owner)
# add addresses and create route for this tap # add addresses and create route for this tap
# Pop IP from tap_address_list and attach to tap if has no ipv4 yet
next_ipv4_addr = '%s' % tap_address_list.pop(0)
# skip to set this IP to tap if already exits
if not partition.tap.ipv4_addr: if not partition.tap.ipv4_addr:
# define new ipv4 address for this tap # define new ipv4 address for this tap
next_ipv4_addr = '%s' % tap_address_list.pop(0)
partition.tap.ipv4_addr = next_ipv4_addr partition.tap.ipv4_addr = next_ipv4_addr
partition.tap.ipv4_netmask = gateway_addr_dict['netmask'] partition.tap.ipv4_netmask = gateway_addr_dict['netmask']
partition.tap.ipv4_gateway = gateway_addr_dict['addr'] partition.tap.ipv4_gateway = gateway_addr_dict['addr']
......
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