From nobody Thu Mar 16 09:50:36 2023 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 4PcjDr3xn5z3ydKS; Thu, 16 Mar 2023 09:50:36 +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 4PcjDr3W81z44Sy; Thu, 16 Mar 2023 09:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678960236; 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=NPIBFT1nAzLwl3ZzDYZiTwsQelo6fy3tilrExZ5TRpc=; b=i8c31fkBzmiPp6nIg+fX9ScqXr5/ISQazLmmeCiXwzp6HJNJL8Rw6y14jsx8230ZnFI4ns Ljyo3ncZ20QZ5NqGsUhVn9DxtLm203ELRkLq35b55F5erSA28Aoh0D6FEq5o8ARI3OhhlC 7+Mlr2qBh8cF2Jr09SF51gZEjfRocBN6sFfJuQ0JaWiEiDJmI5XyBjP0vP2cxV3O8yjWIV WfOY84/cy3nnVC2wFXA99Aiu+fJTr4q7bRK7Sj7WRWdxchdoA9vpv39W2f05hkJYDp7AWK Kso5YvcpbyVhWdg/JXiZdmBZPhhmcY7zEesYWc53ikp/XK27KB2W/NhlJvCOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678960236; 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=NPIBFT1nAzLwl3ZzDYZiTwsQelo6fy3tilrExZ5TRpc=; b=i59nCoKPycDipXHtXOeIsjTu8BmIP+akFlBC4YOgz++Fw5oIo36p+Cpveb2X05RFBWEzj/ i7oBof/SRKHJ7bTq+SFpHzLjJnS+g1p1oVKYhQex8AOsz63ceOLFm3++N4L+sPW6VLHQXx uWrQn9RZru98USldBR2bYM9XPvwoibizWsxeRkabL+wibnFmb6tcPT/Y5/piC8LC4Jlgbl tihBtXWHHLo/M/NynIEJMI4AeYTOagFO809+SO0tvkX7mu2SeOJOMHKj6CYSDIUQIECNwG DMKFlOhg8BhxatAgSydbL8xzAyb7E8MWaxZ8KkLElB9R0Oi5O5JUhMaw5wfYdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678960236; a=rsa-sha256; cv=none; b=SMl+GTIXyU1bf9DazmmaECULZpMK7ko4FalkrnstFeB86RxnwDm65DWDO6roXR5toeOb8p JiyShOB0snVRYxliMZyo2QJp86EHX8eqP0VA/NLN9D89DRRUqxNjjwIYpbc/ysNlF+v4TU CAFq5VP4JXzRPvnr9qZXHdOX4WIfzxZIiAg514Vl3Yv20OGXrfdJoNbt/WWSQ9+fvAy8sc CvfMEp8iXoX7HPahlF1+y47r/9hyhCrPwGqriEzRQ1ytjFjhXLImkCK7wTG7VuYzGNICwp CUBz/KCMTfUZDOeLQCpOCO9MaTrj6ENlIMG4l9ihqzpBU+B/tDJDORDiioyQ6w== 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 4PcjDr2KwvzfDr; Thu, 16 Mar 2023 09:50:36 +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 32G9oaiM040977; Thu, 16 Mar 2023 09:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32G9oaqV040976; Thu, 16 Mar 2023 09:50:36 GMT (envelope-from git) Date: Thu, 16 Mar 2023 09:50:36 GMT Message-Id: <202303160950.32G9oaqV040976@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: c91ae48a25ed - main - sctp: don't do RTT measurements with cookies 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: c91ae48a25edd426efc49ade14fb675e07a0f5ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c91ae48a25edd426efc49ade14fb675e07a0f5ed commit c91ae48a25edd426efc49ade14fb675e07a0f5ed Author: Michael Tuexen AuthorDate: 2023-03-16 09:45:13 +0000 Commit: Michael Tuexen CommitDate: 2023-03-16 09:45:13 +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. MFC after: 1 week --- 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 6299c5c7d827..3da483bdf37a 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, @@ -2204,17 +2194,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);