From nobody Sun Apr 07 20:45:57 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 4VCPPx57fyz5HVf9; Sun, 7 Apr 2024 20:45:57 +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 4VCPPx4Syqz4mjH; Sun, 7 Apr 2024 20:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712522757; 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=BGx5v1uSj7aDJRV0zF23Z9jAdgsIsVwXZC69+whxh3E=; b=nFfi1mO6XXAeyPUR2H3MBqygOoBU3CjBEUvOwdpiWrtSX9wnbt3hilcfIqlpRdo8ffAkeD ddxWSmQsjeFdNB7slwbH52k5X3y4zC7/NWnEDlAMX75sMvdwN290R+wBLgvSdtUVzrsYGO TRabpOIyuR8xVqx+RsPSdnxs5vgtPolWVJky/z4qxRUnLE8DSCEVylK+8Hj0J9vWI49YDb nWA2Uh6ngmgrQRsMSdnfIjJ/1BJBNaGIZC6Rb8WUpsxsZ985AqitZEQcWLW/BDNlaEud+y 4i6aJU13Lvm48TBh0ce65M2Rp4XdoOemf8z3T8S4hrB/6PHmSCWDzs89X8rzjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712522757; a=rsa-sha256; cv=none; b=iUHFHxcnS4ezprPmCRptMxdpUNt00KKaIqnwz5RF/IsEaMZa24dJi2/UBwjFc0ooNLO+rn V+nsQDZIzX8opNSChXronbi6/MOaKiOtAJw542Fvvl141yQ7csMemtrj3J3uVf6LUHW1yy Yqp3o1F8rhIyKrXzBdY/H8lxe3Q0qB7FZHUIUi1ul4NTaHAjrAJvYeXtUsumCVgZSi1XBH +1lsASWuENAtdr8RbCGNv7Uqy2oAyC94uj/GjahIKlswMaH/nCHOAwuFWAeAQVdKgd3Ua8 pgjiifS0FjqFLFPcMMbcB0Au2WYv0GuwZhQfCSUVuNyJfikIm5QM6cjiCJlNiQ== 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=1712522757; 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=BGx5v1uSj7aDJRV0zF23Z9jAdgsIsVwXZC69+whxh3E=; b=QN3QQRcHoOul8VUM7Hm1km6zByq6uLcWr9NyibkkT9qDYTd0n9crDiL3Y98wvyuBEBLU23 NomSMdtk6/oLjFh/tVbOG+3ArdWBNpTa/f+GwU6ZZOVdZgLMP6AbBLwwoCsf9ZdK+MHhju s7QpyyXNsg35cZHhcw3jQaE3XFoqJK7rZnaC2peOo9DHV9ztolmCS3Ao2xtXXlArQ/dN5b v8ugvHMuv/zYTcmjq1l4FPXAB33hiUBtiQqLLjAv5VaPTSCIDuwIn+ousZ3iCyaLXK5UuB SX8EUstfxKAT5h8HWT69Q9Ds4+yn6Q4s5SsfvPvt1aQagFutZFUviiYzf3vApA== 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 4VCPPx43zgzjh5; Sun, 7 Apr 2024 20:45:57 +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 437Kjvve015866; Sun, 7 Apr 2024 20:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 437Kjv3F015863; Sun, 7 Apr 2024 20:45:57 GMT (envelope-from git) Date: Sun, 7 Apr 2024 20:45:57 GMT Message-Id: <202404072045.437Kjv3F015863@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: e8c149ab85c7 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: e8c149ab85c7834f76325864f22ca89298e65f75 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e8c149ab85c7834f76325864f22ca89298e65f75 commit e8c149ab85c7834f76325864f22ca89298e65f75 Author: Michael Tuexen AuthorDate: 2024-04-07 20:41:24 +0000 Commit: Michael Tuexen CommitDate: 2024-04-07 20:41:24 +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 MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44669 --- 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 d27a79d1c3b1..1c6bdedc9368 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3272,6 +3272,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; }