From a8d7cee3e819f0e278c8da9ff2e7d72fbe0e82b8 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Thu, 17 May 2018 12:49:16 -0700 Subject: Fix sendto for dual stack UDP sockets Previously, dual stack UDP sockets bound to an IPv4 address could not use sendto to communicate with IPv4 addresses. Further, dual stack UDP sockets bound to an IPv6 address could use sendto to communicate with IPv4 addresses. Neither of these behaviors are consistent with Linux. PiperOrigin-RevId: 197036024 Change-Id: Ic3713efc569f26196e35bb41e6ad63f23675fc90 --- pkg/syserr/netstack.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/syserr') diff --git a/pkg/syserr/netstack.go b/pkg/syserr/netstack.go index 36726e967..c40fb7dbf 100644 --- a/pkg/syserr/netstack.go +++ b/pkg/syserr/netstack.go @@ -77,6 +77,7 @@ var netstackErrorTranslations = map[*tcpip.Error]*Error{ tcpip.ErrInvalidOptionValue: ErrInvalidOptionValue, tcpip.ErrNoLinkAddress: ErrHostDown, tcpip.ErrBadAddress: ErrBadAddress, + tcpip.ErrNetworkUnreachable: ErrNetworkUnreachable, } // TranslateNetstackError converts an error from the tcpip package to a sentry -- cgit v1.2.3