diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-09 04:45:46 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-09 04:45:46 +0000 |
commit | 8aebd0c66a48e61e0741dccf191190122a42e5c7 (patch) | |
tree | 0753c40620c3a23ccc070fd6bead60b438556a16 /pkg/syserr/netstack.go | |
parent | cb52b569b89f3ca61695fbf07175cf6e4503e168 (diff) | |
parent | abbdcebc543242862fad0984db2db0a842021917 (diff) |
Merge release-20210301.0-29-gabbdcebc5 (automated)
Diffstat (limited to 'pkg/syserr/netstack.go')
-rw-r--r-- | pkg/syserr/netstack.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/syserr/netstack.go b/pkg/syserr/netstack.go index 0b9139570..79e564de6 100644 --- a/pkg/syserr/netstack.go +++ b/pkg/syserr/netstack.go @@ -51,6 +51,7 @@ var ( ErrNotPermittedNet = New((&tcpip.ErrNotPermitted{}).String(), linux.EPERM) ErrBadBuffer = New((&tcpip.ErrBadBuffer{}).String(), linux.EFAULT) ErrMalformedHeader = New((&tcpip.ErrMalformedHeader{}).String(), linux.EINVAL) + ErrInvalidPortRange = New((&tcpip.ErrInvalidPortRange{}).String(), linux.EINVAL) ) // TranslateNetstackError converts an error from the tcpip package to a sentry @@ -135,6 +136,8 @@ func TranslateNetstackError(err tcpip.Error) *Error { return ErrBadBuffer case *tcpip.ErrMalformedHeader: return ErrMalformedHeader + case *tcpip.ErrInvalidPortRange: + return ErrInvalidPortRange default: panic(fmt.Sprintf("unknown error %T", err)) } |