diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-08-26 23:48:20 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-26 23:48:20 +0000 |
commit | 17f461caab0541f7bddd97335a7f6356647fbe4f (patch) | |
tree | 338fbd1b285885ded606abd000f8d75b3d510be7 /pkg/tcpip/transport | |
parent | 4aa99ce0cca8538fb9bc0338ce270ecbfbbcd33b (diff) | |
parent | 1fdefd41c5410291b50c3f28ca13f423031f1f12 (diff) |
Merge 1fdefd41 (automated)
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r-- | pkg/tcpip/transport/tcp/snd.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index 1f9b1e0ef..735edfe55 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -664,7 +664,14 @@ func (s *sender) maybeSendSegment(seg *segment, limit int, end seqnum.Value) (se segEnd = seg.sequenceNumber.Add(1) // Transition to FIN-WAIT1 state since we're initiating an active close. s.ep.mu.Lock() - s.ep.state = StateFinWait1 + switch s.ep.state { + case StateCloseWait: + // We've already received a FIN and are now sending our own. The + // sender is now awaiting a final ACK for this FIN. + s.ep.state = StateLastAck + default: + s.ep.state = StateFinWait1 + } s.ep.mu.Unlock() } else { // We're sending a non-FIN segment. |