We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4f1b7f commit a22f88aCopy full SHA for a22f88a
pkg/limayaml/validate.go
@@ -579,9 +579,22 @@ func validateParamIsUsed(y *limatype.LimaYAML) error {
579
return nil
580
}
581
582
+func lookupIP(host string) error {
583
+ if strings.HasSuffix(host, ".local") {
584
+ // allow offline or slow mDNS
585
+ return nil
586
+ }
587
+ ctx := context.Background()
588
+ _, err := net.DefaultResolver.LookupIP(ctx, "ip", host)
589
+ return err
590
+}
591
+
592
func validateHost(field, host string) error {
- if net.ParseIP(host) == nil {
- return fmt.Errorf("field `%s` must be IP", field)
593
+ if net.ParseIP(host) != nil {
594
595
596
+ if err := lookupIP(host); err != nil {
597
+ return fmt.Errorf("field `%s` must be IP: %w", field, err)
598
599
600
0 commit comments