fix enabling dhcp on a virtual interface
This commit is contained in:
parent
ac587f9bf6
commit
cc52bb62a5
|
@ -20,6 +20,10 @@ Network:
|
|||
subnet: "10.2.0.0/24"
|
||||
address: 10.2.0.1
|
||||
searchdomains: lab
|
||||
- obj: [interface name bond10]
|
||||
action: EDIT_IPV4
|
||||
method-data:
|
||||
method: dhcp
|
||||
- action: done
|
||||
Proxy:
|
||||
proxy: ""
|
||||
|
|
|
@ -67,7 +67,8 @@ class SubiquityNetworkEventReceiver(NetworkEventReceiver):
|
|||
netdev = self.model.update_link(ifindex)
|
||||
if netdev is None:
|
||||
return
|
||||
if not (netdev.info.flags & IFF_UP) and ifindex in self.default_routes:
|
||||
flags = getattr(netdev.info, "flags", 0)
|
||||
if not (flags & IFF_UP) and ifindex in self.default_routes:
|
||||
self.default_routes.remove(ifindex)
|
||||
for watcher in self.default_route_watchers:
|
||||
watcher(self.default_routes)
|
||||
|
|
Loading…
Reference in New Issue