diff --git a/cmd/cli/cli.go b/cmd/cli/cli.go index 2f4916c..987a470 100644 --- a/cmd/cli/cli.go +++ b/cmd/cli/cli.go @@ -2649,6 +2649,9 @@ func resetDnsTask(p *prog, s service.Service) task { isCtrldInstalled := !errors.Is(err, service.ErrNotInstalled) isCtrldRunning := status == service.StatusRunning return task{func() error { + if iface == "" { + return nil + } // Always reset DNS first, ensuring DNS setting is in a good state. // resetDNS must use the "iface" value of current running ctrld // process to reset what setDNS has done properly.