diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-02-03 19:14:39 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-03 19:14:39 +0000 |
commit | 939f5cc51a14553474a023d8b6b20fb8546c3ce0 (patch) | |
tree | cef5bee993692109ba0091aed491c1dc063848e1 | |
parent | 93cf423177aeae312d497f095a1531f9202d0240 (diff) | |
parent | e3bce9689fcdbd1f6a3cfd9ead23abcdb0afd368 (diff) |
Merge release-20210125.0-74-ge3bce9689 (automated)
-rw-r--r-- | pkg/tcpip/transport/tcp/snd.go | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index 463a259b7..063a7086a 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -1320,7 +1320,9 @@ func (s *sender) handleRcvdSegment(rcvdSeg *segment) { // unacknowledged and also never retransmitted sequence below // RACK.fack, then the corresponding packet has been // reordered and RACK.reord is set to TRUE. - s.walkSACK(rcvdSeg) + if s.ep.tcpRecovery&tcpip.TCPRACKLossDetection != 0 { + s.walkSACK(rcvdSeg) + } s.SetPipe() } @@ -1339,7 +1341,9 @@ func (s *sender) handleRcvdSegment(rcvdSeg *segment) { } // See if TLP based recovery was successful. - s.detectTLPRecovery(ack, rcvdSeg) + if s.ep.tcpRecovery&tcpip.TCPRACKLossDetection != 0 { + s.detectTLPRecovery(ack, rcvdSeg) + } // Stash away the current window size. s.sndWnd = rcvdSeg.window @@ -1421,7 +1425,7 @@ func (s *sender) handleRcvdSegment(rcvdSeg *segment) { } // Update the RACK fields if SACK is enabled. - if s.ep.sackPermitted && !seg.acked { + if s.ep.sackPermitted && !seg.acked && s.ep.tcpRecovery&tcpip.TCPRACKLossDetection != 0 { s.rc.update(seg, rcvdSeg) s.rc.detectReorder(seg) } @@ -1455,7 +1459,9 @@ func (s *sender) handleRcvdSegment(rcvdSeg *segment) { // Update RACK when we are exiting fast or RTO // recovery as described in the RFC // draft-ietf-tcpm-rack-08 Section-7.2 Step 4. - s.rc.exitRecovery() + if s.ep.tcpRecovery&tcpip.TCPRACKLossDetection != 0 { + s.rc.exitRecovery() + } } } @@ -1483,7 +1489,9 @@ func (s *sender) handleRcvdSegment(rcvdSeg *segment) { // See: https://tools.ietf.org/html/draft-ietf-tcpm-rack-08#section-7.2 // * Upon receiving an ACK: // * Step 4: Update RACK reordering window - s.rc.updateRACKReorderWindow(rcvdSeg) + if s.ep.tcpRecovery&tcpip.TCPRACKLossDetection != 0 { + s.rc.updateRACKReorderWindow(rcvdSeg) + } // Now that we've popped all acknowledged data from the retransmit // queue, retransmit if needed. |