func checkLocalIPv6LoopbackAddress()

in dp_check/dp_check.go [274:284]


func checkLocalIPv6LoopbackAddress(ipv6FromMetadataServer *net.IP) error {
	if ipv6FromMetadataServer == nil {
		return fmt.Errorf("skipping search for IPv6 loopback address because the VM failed to get a valid IPv6 address from metadata server")
	}
	var err error
	ipv6Loopback := net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1}
	if _, err = findLocalAddress(func(ip net.IP) bool { return ip.To4() == nil && ip.Equal(ipv6Loopback) }, skipNonLoopback); err != nil {
		return fmt.Errorf(`failed to find local IPv6 loopback address "::1" because: %v. Although this isn't inherently needed for Directpath connectivity, some gRPC client releases use a presence of the IPv6 loopback address as a heuristic to determine if the local runtime environment supports IPv6. So a lack of this address might prevent the client from being able to use IPv6`, err)
	}
	return nil
}