summaryrefslogtreecommitdiffhomepage
path: root/pkg/syserr/netstack.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-05-17 12:49:16 -0700
committerShentubot <shentubot@google.com>2018-05-17 12:50:22 -0700
commita8d7cee3e819f0e278c8da9ff2e7d72fbe0e82b8 (patch)
tree3da0e396c5738007dcd5e418c1fb4cdc67c4843a /pkg/syserr/netstack.go
parent31386185fe7c2079ee412a411e536a5bf9e9eb25 (diff)
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
Diffstat (limited to 'pkg/syserr/netstack.go')
-rw-r--r--pkg/syserr/netstack.go1
1 files changed, 1 insertions, 0 deletions
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