diff options
author | Ian Gudger <igudger@google.com> | 2020-03-18 16:25:20 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-18 16:26:36 -0700 |
commit | 92a00ca91affab8564b8875387758914ddc9785b (patch) | |
tree | c2df513c7bf2600ef5c229fd87ef1f1ca5dc4d32 /pkg/tcpip/transport/tcp/segment.go | |
parent | b5ea65c07c29cbc894e9f879796eed816696d042 (diff) |
Store segment transmit count.
This will aid in segment reordering detection.
Updates #691
PiperOrigin-RevId: 301692638
Diffstat (limited to 'pkg/tcpip/transport/tcp/segment.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/segment.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/tcp/segment.go b/pkg/tcpip/transport/tcp/segment.go index 1c10da5ca..5d0bc4f72 100644 --- a/pkg/tcpip/transport/tcp/segment.go +++ b/pkg/tcpip/transport/tcp/segment.go @@ -56,9 +56,9 @@ type segment struct { options []byte `state:".([]byte)"` hasNewSACKInfo bool rcvdTime time.Time `state:".(unixTime)"` - // xmitTime is the last transmit time of this segment. A zero value - // indicates that the segment has yet to be transmitted. - xmitTime time.Time `state:".(unixTime)"` + // xmitTime is the last transmit time of this segment. + xmitTime time.Time `state:".(unixTime)"` + xmitCount uint32 } func newSegment(r *stack.Route, id stack.TransportEndpointID, pkt tcpip.PacketBuffer) *segment { |