Skip to content

Commit

Permalink
cable-guy: bring interfaces up when configuring
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Jan 17, 2025
1 parent d7d7f2a commit 1e4767a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/services/cable_guy/api/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def set_configuration(self, interface: NetworkInterface) -> None:
self.flush_interface(interface.name)
self.remove_dhcp_server_from_interface(interface.name)

if interface.addresses:
# bring interface up
interface_index = self._get_interface_index(interface.name)
self.ipr.link("set", index=interface_index, state="up")
logger.info(f"Configuring addresses for interface '{interface.name}': {interface.addresses}.")
for address in interface.addresses:
if address.mode == AddressMode.Unmanaged:
Expand Down

0 comments on commit 1e4767a

Please sign in to comment.