From nobody Sun Jun 25 19:34:08 2023 X-Original-To: dev-commits-src-branches@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 4Qq1PY335lz4hSwR; Sun, 25 Jun 2023 19:34:09 +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 4Qq1PY2c46z3GGm; Sun, 25 Jun 2023 19:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721649; 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=2gmMuzWmBc+vXgbjLtrhV+oOpoT5Nom6pUtjPG9SGbk=; b=S50H1Aihr5xizUI+qIPQCQWP5xXLGoe7RF3GotwL6s3kf0Ns7ojq4+4arPFugEJscNFgxI lgQkjNRMNkMfWeWI8zLiq+C9JN/d2AmBzLfBw1oHnYHWL+MP0Ni71IJHyqyq8L2uCQ80mi o0aA5p7cMbQMGhacanAlPq8TNVvpSCUTeQxXCUoTy4+hk/4XmoVubQhNkZDOWpWdzajY+V aPX7ftZYuFErbNDZBnL8W/SN4eeoueQuFMYnB8gEpkFdXKWDi8vtwnGu0G9JnxEfesX/nl PhtHYgpAPoosJRPrSVztlqtavaQ09SfxgxqZVscmlM/rRtjqGtZPH+xWntX/EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721649; 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=2gmMuzWmBc+vXgbjLtrhV+oOpoT5Nom6pUtjPG9SGbk=; b=tyUNI+ORVrLkUUD7h3WOKgArpDewYkTWAqSn1miDwFQsB00XxYt58kfTSH3RDmowpkxmf2 vK7jSOFnSbCA63VyuM7F8frL6NNDnncPNXwiQQT53AAT3Li6NScsAprgcmukeIEbeTozx0 lRKIvlm81siMAYtpUJLsJqDkvmj7vLrK3oghZ2KjUEGVXWKozzNqDeHQKELrzleRDUAtoE T2+0u8zDajRPBkp/41V+yUZS8vWonAMJ928wIcILwoe6pyzrJXLeK07FSnm//qOcj8m4+4 WD25DLRFDNpR+5h45veyfNX4CLmyoDApLCAQqQmCPN66MNEewWzyL6qacjk5sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721649; a=rsa-sha256; cv=none; b=SJm6imWWJF/2N3SXj+oLN0vaqoyddc0L2k9HNFspZMiRTvnyY13vXMGTV2DbuF2xb9aykR mJHZWQZUU2O0FkF81lgyl39W9PdIoCSfkK0K6HvcvbJKPZkP5RD/F1O2Hspe6epYRYuYNi PYLMVyD44LzDahKKYC6WaxPjRI1GdJY3qPqXZcG+UiIJM2+E5tchZmdoKYQNoykCr0Ika3 5OWcy2s5gFuI3nOqYNZg3h8C9H16JPcuT0n3TbY0v3FVRmQJ6hmM3//osNaAC+GoMRVH7M /rChe1TmKDWR1AaNdKHLPFqrXdsFZoE8qJMZjamMxpNJM5/fmz9cBVBqdXysDg== 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 4Qq1PY1KD0zfT0; Sun, 25 Jun 2023 19:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJY8D6041289; Sun, 25 Jun 2023 19:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJY86S041288; Sun, 25 Jun 2023 19:34:08 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:34:08 GMT Message-Id: <202306251934.35PJY86S041288@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: 180136462aa9 - stable/13 - sctp: don't do RTT measurements with cookies List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 180136462aa9c941dcfffcf3abee8f452f1565c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=180136462aa9c941dcfffcf3abee8f452f1565c8 commit 180136462aa9c941dcfffcf3abee8f452f1565c8 Author: Michael Tuexen AuthorDate: 2023-03-16 09:45:13 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:33:35 +0000 sctp: don't do RTT measurements with cookies When receiving a cookie, the receiver does not know whether the peer retransmitted the COOKIE-ECHO chunk or not. Therefore, don't do an RTT measurement. It might be much too long. To overcome this limitation, one could do at least two things: 1. Bundle the INIT-ACK chunk with a HEARTBEAT chunk for doing the RTT measurement. But this is not allowed. 2. Add a flag to the COOKIE-ECHO chunk, which indicates that it is the initial transmission, and not a retransmission. But this requires an RFC. (cherry picked from commit c91ae48a25edd426efc49ade14fb675e07a0f5ed) --- sys/netinet/sctp_input.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 836f09f4887f..a0e0d683b5fe 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1351,7 +1351,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, struct sctp_queued_to_read *sq, *nsq; struct sctp_nets *net; struct mbuf *op_err; - struct timeval old; int init_offset, initack_offset, i; int retval; int spec_flag = 0; @@ -1499,16 +1498,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, } /* notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_UP; - /* - * since we did not send a HB make sure we don't - * double things - */ - old.tv_sec = cookie->time_entered.tv_sec; - old.tv_usec = cookie->time_entered.tv_usec; net->hb_responded = 1; - sctp_calculate_rto(stcb, asoc, net, &old, - SCTP_RTT_FROM_NON_DATA); - if (stcb->asoc.sctp_autoclose_ticks && (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE))) { sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, @@ -2202,17 +2192,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); *netp = sctp_findnet(stcb, init_src); if (*netp != NULL) { - struct timeval old; - /* * Since we did not send a HB, make sure we don't double * things. */ (*netp)->hb_responded = 1; - /* Calculate the RTT. */ - old.tv_sec = cookie->time_entered.tv_sec; - old.tv_usec = cookie->time_entered.tv_usec; - sctp_calculate_rto(stcb, asoc, *netp, &old, SCTP_RTT_FROM_NON_DATA); } /* respond with a COOKIE-ACK */ sctp_send_cookie_ack(stcb);