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/sentry/socket/netstack/stack.go | |
parent | cb52b569b89f3ca61695fbf07175cf6e4503e168 (diff) | |
parent | abbdcebc543242862fad0984db2db0a842021917 (diff) |
Merge release-20210301.0-29-gabbdcebc5 (automated)
Diffstat (limited to 'pkg/sentry/socket/netstack/stack.go')
-rw-r--r-- | pkg/sentry/socket/netstack/stack.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/sentry/socket/netstack/stack.go b/pkg/sentry/socket/netstack/stack.go index 71c3bc034..b215067cf 100644 --- a/pkg/sentry/socket/netstack/stack.go +++ b/pkg/sentry/socket/netstack/stack.go @@ -478,3 +478,13 @@ func (s *Stack) SetForwarding(protocol tcpip.NetworkProtocolNumber, enable bool) } return nil } + +// PortRange implements inet.Stack.PortRange. +func (s *Stack) PortRange() (uint16, uint16) { + return s.Stack.PortRange() +} + +// SetPortRange implements inet.Stack.SetPortRange. +func (s *Stack) SetPortRange(start uint16, end uint16) error { + return syserr.TranslateNetstackError(s.Stack.SetPortRange(start, end)).ToError() +} |