summaryrefslogtreecommitdiffhomepage
path: root/pkg/syserr
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2020-07-15 14:55:12 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-15 14:56:39 -0700
commit857d03f258ffafb815698917f2a1ee9e7e265464 (patch)
tree06202339ae9a0530a304ba81a7288f3a81520b2b /pkg/syserr
parentfef90c61c6186c113cfdb0bbcf53f4ca70f9741a (diff)
Add support for SO_ERROR to packet sockets.
Packet sockets also seem to allow double binding and do not return an error on linux. This was tested by running the syscall test in a linux namespace as root and the current test DoubleBind fails@HEAD. Passes after this change. Updates #173 PiperOrigin-RevId: 321445137
Diffstat (limited to 'pkg/syserr')
-rw-r--r--pkg/syserr/netstack.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/syserr/netstack.go b/pkg/syserr/netstack.go
index 8ff922c69..5ae10939d 100644
--- a/pkg/syserr/netstack.go
+++ b/pkg/syserr/netstack.go
@@ -22,7 +22,7 @@ import (
// Mapping for tcpip.Error types.
var (
ErrUnknownProtocol = New(tcpip.ErrUnknownProtocol.String(), linux.EINVAL)
- ErrUnknownNICID = New(tcpip.ErrUnknownNICID.String(), linux.EINVAL)
+ ErrUnknownNICID = New(tcpip.ErrUnknownNICID.String(), linux.ENODEV)
ErrUnknownDevice = New(tcpip.ErrUnknownDevice.String(), linux.ENODEV)
ErrUnknownProtocolOption = New(tcpip.ErrUnknownProtocolOption.String(), linux.ENOPROTOOPT)
ErrDuplicateNICID = New(tcpip.ErrDuplicateNICID.String(), linux.EEXIST)