Page MenuHomeFreeBSD

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

Authored by rrs on Nov 17 2021, 3:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 6 2023, 12:02 AM
Unknown Object (File)
Jun 19 2023, 1:48 PM
Unknown Object (File)
Mar 22 2023, 6:16 PM
Unknown Object (File)
Mar 5 2023, 7:55 AM
Unknown Object (File)
Jan 16 2023, 8:40 PM
Subscribers

Details

Reviewers
tuexen
lstewart
Group Reviewers
transport
Summary

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
Lint Skipped
Unit
Tests Skipped