From 6143b134e31b4e047c4fd32ba5b7a319b19ea893 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Fri, 17 Jun 2022 21:44:06 +0800 Subject: [PATCH] fix: resolve ipv4 of 4 in 6 --- component/resolver/resolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/resolver/resolver.go b/component/resolver/resolver.go index bd1b262b..d2c036d5 100644 --- a/component/resolver/resolver.go +++ b/component/resolver/resolver.go @@ -173,7 +173,7 @@ func ResolveAllIPv4WithResolver(host string, r Resolver) ([]netip.Addr, error) { ip, err := netip.ParseAddr(host) if err == nil { - if ip.Is4() { + if ip.Is4() || ip.Is4In6() { return []netip.Addr{ip}, nil } return []netip.Addr{}, ErrIPVersion