summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/stack.go
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/tcpip/stack/stack.go
parentcb52b569b89f3ca61695fbf07175cf6e4503e168 (diff)
parentabbdcebc543242862fad0984db2db0a842021917 (diff)
Merge release-20210301.0-29-gabbdcebc5 (automated)
Diffstat (limited to 'pkg/tcpip/stack/stack.go')
-rw-r--r--pkg/tcpip/stack/stack.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go
index de94ddfda..53370c354 100644
--- a/pkg/tcpip/stack/stack.go
+++ b/pkg/tcpip/stack/stack.go
@@ -813,6 +813,18 @@ func (s *Stack) Forwarding(protocolNum tcpip.NetworkProtocolNumber) bool {
return forwardingProtocol.Forwarding()
}
+// PortRange returns the UDP and TCP inclusive range of ephemeral ports used in
+// both IPv4 and IPv6.
+func (s *Stack) PortRange() (uint16, uint16) {
+ return s.PortManager.PortRange()
+}
+
+// SetPortRange sets the UDP and TCP IPv4 and IPv6 ephemeral port range
+// (inclusive).
+func (s *Stack) SetPortRange(start uint16, end uint16) tcpip.Error {
+ return s.PortManager.SetPortRange(start, end)
+}
+
// SetRouteTable assigns the route table to be used by this stack. It
// specifies which NIC to use for given destination address ranges.
//