Fix error while refreshing ip if the virtual nic doesn't have any ip
Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
parent
b99731397b
commit
be8dfc25f7
|
@ -1197,6 +1197,8 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
for addrs in info.values():
|
for addrs in info.values():
|
||||||
if addrs["hwaddr"] != iface.macaddr:
|
if addrs["hwaddr"] != iface.macaddr:
|
||||||
continue
|
continue
|
||||||
|
if not addrs["addrs"]:
|
||||||
|
continue
|
||||||
for addr in addrs["addrs"]:
|
for addr in addrs["addrs"]:
|
||||||
if addr["type"] == 0:
|
if addr["type"] == 0:
|
||||||
ipv4 = addr["addr"]
|
ipv4 = addr["addr"]
|
||||||
|
|
Loading…
Reference in New Issue