From nobody Wed Feb 1 22:48:31 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 4P6cXH44gwz3cFdD; Wed, 1 Feb 2023 22:48:31 +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 4P6cXH3S4pz4Q5D; Wed, 1 Feb 2023 22:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291711; 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=7pX6iJ5bSJP6m30/RqaR9QtHivZb8w5yNOQX7jk0jis=; b=nka5JZL+j2/xFHZfbVE5dphDN06qNDSSsMDyb3SmSp787v7QHcYLbIaRkl+DaXn2Tij7BD sBUjHpKWWrI0Fr/qqmzWOKPP1Wdxf3RiG1pNg99XWjJqZZJDASv7BrKMvT7ijn2yR108v6 sVCL2wm3LcqGnvBQ5qsf+C9ocijlgP6p4Bv7AzkGDmNF45l6qr4Z76XE3guQd4w6KZOVeU zGx36qKEPRbKoMS8gliWYDtXkdyVtDSUbWfTuyNXwGAUu9thBo/0wdT3gJFQ6gxelJhiQQ +GBUQRmc/KZc5OQfnnVusy0F/Yba+VgNLu6ASydKG8V9XhRI7/A4NmXKBoQCYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291711; 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=7pX6iJ5bSJP6m30/RqaR9QtHivZb8w5yNOQX7jk0jis=; b=QPJf5so3bhMOiEfc+bWuV5tfn2rBmCdzaa0XhlZn84Wzp6hzpk1bQO1yywju9ZrwBagHo6 0m9fluQrSoB19S+fpb0FKHo5AfAmmSlg75fWRZzDphfkOrNaJr2unmgQsYewb9p1XhhB6E HbPWr/g7kFdnAfet/7aJF9vXAz/y5elHbrUIoSBN7q8WpIM/wULmJv30y+SqpqcJYTQx8t mABNp+QqwMCWYuymS4udsn1ZzxE4+GVP7gi8tvcAvm7li3/u29x8FtyHT9PsEQRIyxQw0A 1ILQjza9G39300TfMOV5n95isD1Lz0Msv48/sJBHsEVYnFvRvelKPEIqSr0q2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675291711; a=rsa-sha256; cv=none; b=utbDQ4sCMKgpQGcIJmllTXK5+yV7G3SnfQQaFo4WzDTvnRpMNB/SDJh5Gdm/0USw8XYnKX d6TDv12XJqKg6L0fs7u259Y0AaMPND5NJQBnJceM+WWx0OjkRGdV6BJej9+k5UYcEMGocG tlG15cvhGzSDk96L9+tbMf8OoOEx/r5Efw8CJRYCDeruoGWlkkFvRI7FkgKlelbsa4EuuY obnjjMhKYPH6jGAtrbTdjqucafcdQiBc0mORa/d6z+Y7L4M+DIRQEUy6OeKSDJGdAEN9Nm KaLI+wkR81FP9B4GudCfXEoeqDT83rS2/5IczfpsfvxOVUg2xQKknlvj7yFryw== 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 4P6cXH2W3wzWTJ; Wed, 1 Feb 2023 22:48:31 +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 311MmVGQ003700; Wed, 1 Feb 2023 22:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311MmVea003699; Wed, 1 Feb 2023 22:48:31 GMT (envelope-from git) Date: Wed, 1 Feb 2023 22:48:31 GMT Message-Id: <202302012248.311MmVea003699@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: 4e681215ff62 - stable/13 - sctp: improve path verification 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: 4e681215ff62e691d8d3cd6e884ed035f486f93c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4e681215ff62e691d8d3cd6e884ed035f486f93c commit 4e681215ff62e691d8d3cd6e884ed035f486f93c Author: Michael Tuexen AuthorDate: 2022-05-14 06:07:28 +0000 Commit: Michael Tuexen CommitDate: 2023-02-01 22:48:07 +0000 sctp: improve path verification Ensure that a HB can be sent faster than a HB.Interval when performing path verification of a reachable peer address. Thanks to Alexander Funke for finding the issue and proposing a fix. (cherry picked from commit aab6e5bd1e2b2919604eed68f76d4a7bb73ccb0c) --- sys/netinet/sctp_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index baaed2c78fb1..c808b6751384 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1441,7 +1441,8 @@ sctp_heartbeat_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, (TAILQ_EMPTY(&stcb->asoc.sent_queue))) { sctp_audit_stream_queues_for_size(inp, stcb); } - if (((net->dest_state & SCTP_ADDR_NOHB) == 0) && + if ((((net->dest_state & SCTP_ADDR_NOHB) == 0) || + (net->dest_state & SCTP_ADDR_UNCONFIRMED)) && (net_was_pf || ((net->dest_state & SCTP_ADDR_PF) == 0))) { /* * When moving to PF during threshold management, a HB has @@ -1461,6 +1462,7 @@ sctp_heartbeat_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, ms_gone_by = 0xffffffff; } if ((ms_gone_by >= net->heart_beat_delay) || + (net->dest_state & SCTP_ADDR_UNCONFIRMED) || (net->dest_state & SCTP_ADDR_PF)) { sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); }