Page MenuHomeFreeBSD

Fix SACK generation when dealing with SYN segments carrying user data

Authored by tuexen on Mar 22 2021, 1:05 PM.



When handling a SYN segment with user data in the SYN-SENT state, a DSACK is generated, which is incorrect. This patch fixes this.

Test Plan

Run the following tests from the TCP state event test suite:

  • state-event-engine/rcv-syn-fin-syn-sent/rcv-syn-fin-with-data-syn-sent-dropping-disabled-ipv4.pkt
  • state-event-engine/rcv-syn-fin-syn-sent/rcv-syn-fin-with-data-syn-sent-dropping-disabled-ipv6.pkt
  • state-event-engine/rcv-syn-syn-sent/rcv-syn-with-data-syn-sent-ipv4.pkt
  • state-event-engine/rcv-syn-syn-sent/rcv-syn-with-data-syn-sent-ipv6.pkt

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Thanks for updating the packetdrill scripts to match recent improvements too.

This revision is now accepted and ready to land.Mar 22 2021, 1:57 PM

Gave this a 2nd thought, but still think that the check if the session state has transitioned to established overall is the correct approach.

Or would there be any conceiveable paths, where either a DSACK or SACK could be triggerend from a data-SYN?

(Only a DSACK on the receipt of a duplicate data-SYN comes to mind, or when the data-SYN chances in size between the first observed / 2nd receipt. But in these cases, the session would be established too...)

This revision was automatically updated to reflect the committed changes.