Page MenuHomeFreeBSD

tcp: a more proper fix for the previous ack-wark
ClosedPublic

Authored by rrs on Thu, Jun 3, 3:24 PM.

Details

Summary

So it turns out that my fix before was not correct. It ended with us failing
some of the "improved" SYN tests, since we are not in the correct states.
With more digging I have figured out the root of the problem is that when
we receive a SYN|FIN the reassembly code made it so we create a segq entry
to hold the FIN. In the established state where we were not in order this
would be correct i.e. a 0 len with a FIN would need to be accepted. But
if you are in a front state we need to strip the FIN so we correctly handle
the ACK but ignore the FIN. This gets us into the proper states
and avoids the previous ack war.

I back out some of the previous changes but then add a new change
here in tcp_reass() that fixes the root cause of the issue. We still
leave the rack panic fixes in place however.

Test Plan

Make sure the improved RCV-SYN tests pass (the ones that check state) and also
make sure the syscaller reproducer does not cause an ack war.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped