aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2024-01-06 20:31:46 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2024-01-12 15:38:23 +0000
commit3f57a09489e523fdaea4c927cf725b65112af56c (patch)
treecccd1f3b4a8a2d8d9788ad8d9ac221a0d56be479
parent77292494fb3c831d5b70923f2258869c252b0311 (diff)
downloadsrc-3f57a09489e523fdaea4c927cf725b65112af56c.tar.gz
src-3f57a09489e523fdaea4c927cf725b65112af56c.zip
tcpsso: support TIME_WAIT state
TCP endpoints in TIME_WAIT are not handled in a special way anymore. Therefore, they can be handled now by tcpsso. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43351 (cherry picked from commit e179d9739b1438ae9acb958f80a983eff7e3dce9)
-rw-r--r--usr.sbin/tcpsso/tcpsso.812
-rw-r--r--usr.sbin/tcpsso/tcpsso.c5
2 files changed, 6 insertions, 11 deletions
diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8
index 36707d6657d4..c06cd8adb25f 100644
--- a/usr.sbin/tcpsso/tcpsso.8
+++ b/usr.sbin/tcpsso/tcpsso.8
@@ -74,12 +74,10 @@ and value
on a TCP endpoint from the command line.
.Pp
TCP endpoints in the
-.Dv TIME_WAIT
-state can not be handled by
-.Nm .
-TCP endpoints in the
.Dv SYN_RCVD
-state can only be handled if their prior state was
+state can only be handled by
+.Nm
+if their prior state was
.Dv SYN_SENT .
.Pp
.Op Ar level
@@ -176,7 +174,9 @@ is one of
.Dv FIN_WAIT_1 ,
.Dv CLOSING ,
.Dv LAST_ACK ,
-.Dv FIN_WAIT_2 .
+.Dv FIN_WAIT_2,
+or
+.Dv TIME_WAIT .
Using
.Dv SYN_RCVD
only applies to TCP endpoints in the state
diff --git a/usr.sbin/tcpsso/tcpsso.c b/usr.sbin/tcpsso/tcpsso.c
index b79ae9767fe2..7e7e25246d80 100644
--- a/usr.sbin/tcpsso/tcpsso.c
+++ b/usr.sbin/tcpsso/tcpsso.c
@@ -115,10 +115,6 @@ tcpssoall(const char *ca_name, const char *stack, int state,
continue;
- /* Skip endpoints in TIME WAIT. */
- if (xtp->t_state == TCPS_TIME_WAIT)
- continue;
-
/* If requested, skip sockets not having the requested state. */
if ((state != -1) && (xtp->t_state != state))
continue;
@@ -453,7 +449,6 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
if ((state == TCP_NSTATES) ||
- (state == TCPS_TIME_WAIT) ||
(argc < 2) || (argc > 3) ||
(apply_all && apply_subset) ||
(apply_all && apply_specific) ||