From 1c748be29b7f51820ef9713d9e2c9645a74d5c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 9 Jul 2024 20:28:47 +0200 Subject: [PATCH] Allow .local hosts to be offline or slow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders F Björklund --- pkg/limayaml/validate.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkg/limayaml/validate.go b/pkg/limayaml/validate.go index a1b280b09437..f23507fada13 100644 --- a/pkg/limayaml/validate.go +++ b/pkg/limayaml/validate.go @@ -1,7 +1,6 @@ package limayaml import ( - "context" "errors" "fmt" "net" @@ -12,7 +11,6 @@ import ( "runtime" "strings" "unicode" - "time" "github.com/coreos/go-semver/semver" "github.com/docker/go-units" @@ -506,16 +504,11 @@ func ValidateParamIsUsed(y *LimaYAML) error { } func lookupIP(host string) error { - var err error if strings.HasSuffix(host, ".local") { - var r net.Resolver - const timeout = 500 * time.Millisecond // timeout for .local - ctx, cancel := context.WithTimeout(context.TODO(), timeout) - defer cancel() - _, err = r.LookupIP(ctx, "ip", host) - } else { - _, err = net.LookupIP(host) + // allow offline or slow mDNS + return nil } + _, err := net.LookupIP(host) return err }