From nobody Sat Jan 06 20:36:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6sY11q86z55QNq; Sat, 6 Jan 2024 20:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6sY075ZVz47S1; Sat, 6 Jan 2024 20:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704573365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xb9PTJifBi/kfnXhmUmyRyxthHAsgMshzSPgv144k4I=; b=aHu3sZ9f0R1+jXHHPLkPez6zSpO6tKB6l8Nb+sZ3ky4LtUjWmE4ANs2rtwlvOG2F5AFNS5 Fsy1DnWIw6wEAS8WUUaqftrJ+I5hQH5lOfl6fLWwvbcNLm9nHPeSxHbSfSIZzjchYsVPez YTnIEiGsgyXKtmwufuerOBJbJSYR8dH825DrqsGBvuGx59csKtDUzeJbzQrNjGbHiBbA8x a7H6NBzsbKN2sgN59/tE7hRtiC1z0iGiRFPWWYjL6MRM0ZLLR4lKRZDW6VCAJvZJ73Hg+e +w2rXCYx+Qa8dbYNGhRtUo88JRwVls97SSlXqcUIvQ8jHmkdsfeoduDRu3gT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704573365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xb9PTJifBi/kfnXhmUmyRyxthHAsgMshzSPgv144k4I=; b=qNKO+Ao9jMeIfl4KebbUEYKo5YDcactazShUwMETud7pUzUczfauFmCNqcxwiPyCPI7ZAH K0GtLtK5zrjGM94zumbtL+0HGiYx8yH9TrQOeesUdDRagC4J/U20Tza0L8UQHZW/sx8HF/ 4ryb77GTopR8bpZ1mX11NTYUtKxf+KG8zq/kVvOWOISduPC8UkJ1wHPt4vVBUaqSM4Wkt5 u/yATeDo27cNqhNqiJBNlOM6yB9hdFEcf4DgIGLZmsflLcGuLfUJ8u6kheCSvTDsjcIIkD MfJX6yLZ30D/31L42c4p8yf5piKexvOlv0rQzNWsD1g28y35qDb9ZESqb1rQYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704573365; a=rsa-sha256; cv=none; b=Lm7nzHi63Il7fvQaR6DvFpYfHZHHBLCXkzu1nDF3WK1NpYP0rg2WSfgRihl7bUAZlEax2x WkPZoFhG/8LiCCekkzuf9lSSjqZTySm9InJhpKGUuATgYT5ntUkz/NCK9Ai8oSl+fXXl2P D1QuzcO4znEhHJ2fpoms8FzVnBoioY69Qk+jH7TupL9LROn85UUlYZJjaeJ53UQje3hkGD iKRlq+SDCrPvDwO7V48OMAMW1ivtlbviXufqdE5U1DMNy4Bws8XqQ4EfOEjYXOyGpEmwaj cL0XKxa/XYISebVAdfAM3G4C6SiMkm3zLagHuQkp0FgffrwVosw1MtkfbVpCfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6sXz4m4Pzw5t; Sat, 6 Jan 2024 20:36:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406Ka346083673; Sat, 6 Jan 2024 20:36:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406Ka3lI083670; Sat, 6 Jan 2024 20:36:03 GMT (envelope-from git) Date: Sat, 6 Jan 2024 20:36:03 GMT Message-Id: <202401062036.406Ka3lI083670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e179d9739b14 - main - tcpsso: support TIME_WAIT state List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e179d9739b1438ae9acb958f80a983eff7e3dce9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e179d9739b1438ae9acb958f80a983eff7e3dce9 commit e179d9739b1438ae9acb958f80a983eff7e3dce9 Author: Michael Tuexen AuthorDate: 2024-01-06 20:31:46 +0000 Commit: Michael Tuexen CommitDate: 2024-01-06 20:31:46 +0000 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 MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43351 --- usr.sbin/tcpsso/tcpsso.8 | 12 ++++++------ usr.sbin/tcpsso/tcpsso.c | 5 ----- 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) ||