diff --git a/examples/answers-bond.yaml b/examples/answers-bond.yaml index 5356bf32..756a8ab1 100644 --- a/examples/answers-bond.yaml +++ b/examples/answers-bond.yaml @@ -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: "" diff --git a/subiquitycore/controllers/network.py b/subiquitycore/controllers/network.py index 36b69260..2a171073 100644 --- a/subiquitycore/controllers/network.py +++ b/subiquitycore/controllers/network.py @@ -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)