summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-10-30 22:37:35 +0000
committergVisor bot <gvisor-bot@google.com>2019-10-30 22:37:35 +0000
commitfaa77c102f347a1add771f212861ea7c161f3546 (patch)
tree25af2488006421cfce8acc19926e1b53f9812c5f /pkg/tcpip/transport/tcp
parent280585a8ce2cdea30c13c456cda0232030538291 (diff)
parentdb37483cb6acf55b66132d534bb734f09555b1cf (diff)
Merge release-20190806.1-346-gdb37483 (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go7
-rwxr-xr-xpkg/tcpip/transport/tcp/tcp_state_autogen.go2
2 files changed, 9 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index 8a3ca0f1b..a1efd8d55 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -287,6 +287,7 @@ type endpoint struct {
// change throughout the lifetime of the endpoint.
stack *stack.Stack `state:"manual"`
waiterQueue *waiter.Queue `state:"wait"`
+ uniqueID uint64
// lastError represents the last error that the endpoint reported;
// access to it is protected by the following mutex.
@@ -504,6 +505,11 @@ type endpoint struct {
stats Stats `state:"nosave"`
}
+// UniqueID implements stack.TransportEndpoint.UniqueID.
+func (e *endpoint) UniqueID() uint64 {
+ return e.uniqueID
+}
+
// calculateAdvertisedMSS calculates the MSS to advertise.
//
// If userMSS is non-zero and is not greater than the maximum possible MSS for
@@ -565,6 +571,7 @@ func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, waiterQue
interval: 75 * time.Second,
count: 9,
},
+ uniqueID: s.UniqueID(),
}
var ss SendBufferSizeOption
diff --git a/pkg/tcpip/transport/tcp/tcp_state_autogen.go b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
index 57eb0ad58..00347a215 100755
--- a/pkg/tcpip/transport/tcp/tcp_state_autogen.go
+++ b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
@@ -99,6 +99,7 @@ func (x *endpoint) save(m state.Map) {
m.SaveValue("acceptedChan", acceptedChan)
m.Save("EndpointInfo", &x.EndpointInfo)
m.Save("waiterQueue", &x.waiterQueue)
+ m.Save("uniqueID", &x.uniqueID)
m.Save("rcvList", &x.rcvList)
m.Save("rcvClosed", &x.rcvClosed)
m.Save("rcvBufSize", &x.rcvBufSize)
@@ -148,6 +149,7 @@ func (x *endpoint) save(m state.Map) {
func (x *endpoint) load(m state.Map) {
m.Load("EndpointInfo", &x.EndpointInfo)
m.LoadWait("waiterQueue", &x.waiterQueue)
+ m.Load("uniqueID", &x.uniqueID)
m.LoadWait("rcvList", &x.rcvList)
m.Load("rcvClosed", &x.rcvClosed)
m.Load("rcvBufSize", &x.rcvBufSize)