Page MenuHomeFreeBSD

Fix an issue with retransmitted SYN's as well as sending RST's
ClosedPublic

Authored by rrs on May 4 2020, 9:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 2:35 PM
Unknown Object (File)
Thu, Apr 18, 6:14 AM
Unknown Object (File)
Dec 12 2023, 4:52 AM
Unknown Object (File)
Nov 26 2023, 7:22 PM
Unknown Object (File)
Sep 7 2023, 1:56 PM
Unknown Object (File)
Sep 7 2023, 1:56 PM
Unknown Object (File)
Sep 7 2023, 1:56 PM
Unknown Object (File)
Sep 7 2023, 1:55 PM
Subscribers

Details

Summary

Turns out that BBR does not currently handle retransmitted SYN's well. So
lets fix it so it does. Also fix it so it will send a RST if it has one to send.

The problem was reported by ankitraheja09@gmail.com

Test Plan

Michael Tuexen has developed two nice test utilities in pkt drill

For the SYN

--ip_version=ipv4
--tolerance_usecs=75000

+0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.000 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.000 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0.100 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.000 > S 0:0(0) win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 0 ecr 0>
+1.000 > S 0:0(0) win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 1000 ecr 0>
+0.010 < S. 0:0(0) ack 1 win 65535 <mss 1460,sackOK,eol,eol>
+0.000 > . 1:1(0) ack 1 win 65535
+0.100 close(3) = 0
+0.000 > F. 1:1(0) ack 1 win 65535
+0.010 < F. 1:1(0) ack 2 win 65535
+0.000 > . 2:2(0) ack 2 win 65535

And for the RST

--ip_version=ipv4
--tolerance_usecs=75000

+0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.000 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.000 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0.100 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.000 > S 0:0(0) win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 0 ecr 0>
+0.010 < S. 0:0(0) ack 1 win 65535 <mss 1460,sackOK,eol,eol>
+0.000 > . 1:1(0) ack 1 win 65535
+0.000 setsockopt(3, SOL_SOCKET, SO_LINGER, {onoff=1, linger=0}, 8) = 0
+0.100 close(3) = 0
+0.000 > R. 1:1(0) ack 1 win 0

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rrs requested review of this revision.May 4 2020, 9:59 PM
rrs created this revision.
rrs added reviewers: tuexen, transport.
bbr.c
14037 ↗(On Diff #71388)

Is the trailing space there intentionally or by emacs?

14038 ↗(On Diff #71388)

Is the trailing space there intentionally or by emacs?

Please give in the commit message ankitraheja09@gmail.com credit for reporting the issues to rscheff@.

gets rid of some emacs trailing ws

This revision is now accepted and ready to land.May 4 2020, 10:56 PM
This revision was automatically updated to reflect the committed changes.