summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/hostinet
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-03-09 04:45:46 +0000
committergVisor bot <gvisor-bot@google.com>2021-03-09 04:45:46 +0000
commit8aebd0c66a48e61e0741dccf191190122a42e5c7 (patch)
tree0753c40620c3a23ccc070fd6bead60b438556a16 /pkg/sentry/socket/hostinet
parentcb52b569b89f3ca61695fbf07175cf6e4503e168 (diff)
parentabbdcebc543242862fad0984db2db0a842021917 (diff)
Merge release-20210301.0-29-gabbdcebc5 (automated)
Diffstat (limited to 'pkg/sentry/socket/hostinet')
-rw-r--r--pkg/sentry/socket/hostinet/stack.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/sentry/socket/hostinet/stack.go b/pkg/sentry/socket/hostinet/stack.go
index e6323244c..5bcf92e14 100644
--- a/pkg/sentry/socket/hostinet/stack.go
+++ b/pkg/sentry/socket/hostinet/stack.go
@@ -504,3 +504,14 @@ func (s *Stack) Forwarding(protocol tcpip.NetworkProtocolNumber) bool {
func (s *Stack) SetForwarding(tcpip.NetworkProtocolNumber, bool) error {
return syserror.EACCES
}
+
+// PortRange implements inet.Stack.PortRange.
+func (*Stack) PortRange() (uint16, uint16) {
+ // Use the default Linux values per net/ipv4/af_inet.c:inet_init_net().
+ return 32768, 28232
+}
+
+// SetPortRange implements inet.Stack.SetPortRange.
+func (*Stack) SetPortRange(start uint16, end uint16) error {
+ return syserror.EACCES
+}