Page MenuHomeFreeBSD

tcp: TCP connection that enter the TCPS_CLOSED state should not retain BB logging or logs.

Authored by rrs on Wed, Nov 17, 3:22 PM.


Group Reviewers

When a connection enters the TCPS_CLOSED state (usually via a tcp_drop()) further BB logging
is not relevant. Connections that hang around in the TCPS_CLOSED state are usually caused
by the application not closing the socket. Holding on to added resources in this case is
unproductive and wasteful. In fact the only thing that could result in doing this is
a connection held open for a SYN attack. And we do not want the resources tied
up nor added logs being generated if that occurred.

Also lets make sure we have proper comments in the tcp_respond() code of when we
would get there with a INP_RLOCK.

Test Plan

Use packet-drill to open a connection and have it exchange a bit
of data and then send in a RESET with BB logs on. But do not
close it and validate that the data is dumped out to the log-dumper
during the delay.

Diff Detail

Lint Skipped
Unit Tests Skipped