Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2023 22:48:31 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4e681215ff62 - stable/13 - sctp: improve path verification
Message-ID:  <202302012248.311MmVea003699@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=4e681215ff62e691d8d3cd6e884ed035f486f93c

commit 4e681215ff62e691d8d3cd6e884ed035f486f93c
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2022-05-14 06:07:28 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302012248.311MmVea003699>