From nobody Thu Aug 01 20:41:58 2024 X-Original-To: dev-commits-src-all@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 4WZgqp6MMZz5RQP0; Thu, 01 Aug 2024 20:41:58 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgqp5x6bz4LnV; Thu, 1 Aug 2024 20:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544918; 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=PKG9ZWmRBIX8WubKNWouQd4sQB5oe+zMcWQGWM/iCbI=; b=koSomKvILEV/3T+Gh6VBmeFgNwp56QE8fTddDKNz9kXnGTtSL6n/5CTE9bsBV3bu7a448m 4cd5uqVP3g91Q4OmyYAIVySH5UnaqbB9VSqQFqjRcVcYcxAlIVAkh5alvHdlO//QLqF8sD LwBoNx9QYmLsrKrice6dPh/SWZIUb7aVEsSNYwJCVJIt55eB5TX1bHTy+e7KeLglvKA+mh JgsofBXJa5fwli81l6JZ0wki3+qhvXkNVgy5DaBU9ZWmyBOSqwEaeowLFheaTPrsseu5q9 kzfAleK+ahogEhJtw0iquv+w+B6cQI1VDpPMdC75PZ0+9RgGqJ0mOrY4vmYf8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544918; a=rsa-sha256; cv=none; b=I4TU7SLjIsGAAnmKIUlfnefp7SxDmz7XdLUq6Z6W0ItKHknN2bJfMvCZX7U1tf8YR2ZnVN CZEdQG8l2d3TXYRPrqEbEsKRAxhRa6ckqOhUX/QlJvbnuAeGP9/zfQg0xo4w/UydEw2aHC AwpmU0PQx9uT9cZE5oZuzZf3UaoAtqIIa7XeTJzIs4PgyRdlHEydAiz/KQFXxlZVNB/Rto szLjT25loZsBfRcmjoCjq/pFVhvFQzIpr6WXaUjGNHww8l5e39zKOWsEWp8jy/FA4fNsEo gqYsbDsOvLfk40MrJqUmeu1b+peGLJfXNUkBk3u0BKIB74bQnF7RV2jQ7LMWWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544918; 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=PKG9ZWmRBIX8WubKNWouQd4sQB5oe+zMcWQGWM/iCbI=; b=NjGLKUkQQ3qn8kKyvXsun0x7CXhraJ93bAm2zE7gkoVL7Y1MGTWxkoyb4SSoKZL/sO0UfA yD0rzJV72GBje1aWqhx75Xpm9k7l5n8FGK5kIqlPJx5y1rWfD3asgaLGrCfTBD3TmqgE10 PZ4vpBwpebLcCpamxnBGtb6ZN8NxLcvJox1Ev+TyYhKhLn5UY3ICKuCNXGuzhY2ZYsJCLj LvBjOuUhkQsqXhjJGeiqwsoma1olKvMiNxR6bgq/lsn7jppXPn3/IcnHDEBbjoy+85qsyH octeRUHtxx3Sh1QdJdwQIAf2MqG0Y2uUk8Le59Y1VRz0uu9Pgbrt8MUmAmy0AA== 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 4WZgqp5XP0z10hh; Thu, 1 Aug 2024 20:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KfwJI054416; Thu, 1 Aug 2024 20:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Kfwp2054413; Thu, 1 Aug 2024 20:41:58 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:41:58 GMT Message-Id: <202408012041.471Kfwp2054413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5b1ebb6ef6b1 - stable/13 - tcp: add some debug output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 commit 5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 Author: Michael Tuexen AuthorDate: 2024-04-07 20:41:24 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:41:21 +0000 tcp: add some debug output Also log, when dropping text or FIN after having received a FIN. This is the intended behavior described in RFC 9293. A follow-up patch will enforce this behavior for the base stack and the RACK stack. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44669 (cherry picked from commit e8c149ab85c7834f76325864f22ca89298e65f75) --- sys/netinet/tcp_input.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index af6afbd271bb..df4205ef84e1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3298,6 +3298,35 @@ dodata: /* XXX */ len = so->so_rcv.sb_hiwat; #endif } else { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + if (tlen > 0) { + if ((thflags & TH_FIN) != 0) { + log(LOG_DEBUG, "%s; %s: %s: " + "Received %d bytes of data and FIN " + "after having received a FIN, " + "just dropping both\n", + s, __func__, + tcpstates[tp->t_state], tlen); + } else { + log(LOG_DEBUG, "%s; %s: %s: " + "Received %d bytes of data " + "after having received a FIN, " + "just dropping it\n", + s, __func__, + tcpstates[tp->t_state], tlen); + } + } else { + if ((thflags & TH_FIN) != 0) { + log(LOG_DEBUG, "%s; %s: %s: " + "Received FIN " + "after having received a FIN, " + "just dropping it\n", + s, __func__, + tcpstates[tp->t_state]); + } + } + free(s, M_TCPLOG); + } m_freem(m); thflags &= ~TH_FIN; }