For #65635
Change-Id: I4e4b0309d9139f970d6fd6b41303dfd2e0ec6236
Reviewed-on: https://go-review.googlesource.com/c/go/+/617835
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
return ip.z == z4
}
-// Is4In6 reports whether ip is an IPv4-mapped IPv6 address.
+// Is4In6 reports whether ip is an "IPv4-mapped IPv6 address"
+// as defined by RFC 4291.
+// That is, it reports whether ip is in ::ffff:0:0/96.
func (ip Addr) Is4In6() bool {
return ip.Is6() && ip.addr.hi == 0 && ip.addr.lo>>32 == 0xffff
}