Skip to content

Commit

Permalink
Update DNS plug-in on network change
Browse files Browse the repository at this point in the history
Restart the DNS plug-in on network change. This makes sure any
potential host OS DNS configuration changes get picked up by the DNS
plug-in as well.
  • Loading branch information
agners committed Oct 8, 2024
1 parent 1ee01b1 commit 38affe8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions supervisor/host/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ async def update(self, *, force_connectivity_check: bool = False):
"No network D-Bus connection available", _LOGGER.error
) from err

# This potentially updated the DNS configuration. Make sure the DNS plug-in
# picks up the latest settings.
await self.sys_plugins.dns.restart()
await self.check_connectivity(force=force_connectivity_check)

async def apply_changes(
Expand Down

0 comments on commit 38affe8

Please sign in to comment.