diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-13 16:07:57 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-13 16:07:57 +0000 |
commit | 8b0712eb214705d5af3d2b726866e093d86d89fe (patch) | |
tree | c727e0d8d014f8644a5e7b5bd3777c89c5c30705 /pkg/tcpip/tcpip.go | |
parent | b4cf6ea0f72a6e97367ad9b705eded5beafb26f9 (diff) | |
parent | b928d074b461c6f2578c989e48adadc951ed3154 (diff) |
Merge release-20200810.0-22-gb928d074b (automated)
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 091bc5281..07c85ce59 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -958,6 +958,26 @@ type SocketDetachFilterOption int // and port of a redirected packet. type OriginalDestinationOption FullAddress +// TCPTimeWaitReuseOption is used stack.(*Stack).TransportProtocolOption to +// specify if the stack can reuse the port bound by an endpoint in TIME-WAIT for +// new connections when it is safe from protocol viewpoint. +type TCPTimeWaitReuseOption uint8 + +const ( + // TCPTimeWaitReuseDisabled indicates reuse of port bound by endponts in TIME-WAIT cannot + // be reused for new connections. + TCPTimeWaitReuseDisabled TCPTimeWaitReuseOption = iota + + // TCPTimeWaitReuseGlobal indicates reuse of port bound by endponts in TIME-WAIT can + // be reused for new connections irrespective of the src/dest addresses. + TCPTimeWaitReuseGlobal + + // TCPTimeWaitReuseLoopbackOnly indicates reuse of port bound by endpoint in TIME-WAIT can + // only be reused if the connection was a connection over loopback. i.e src/dest adddresses + // are loopback addresses. + TCPTimeWaitReuseLoopbackOnly +) + // IPPacketInfo is the message structure for IP_PKTINFO. // // +stateify savable |