aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2022-05-14 06:05:03 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2023-02-01 22:47:23 +0000
commit429c706669e887139aa64e7b573757865a40a2bc (patch)
treeecc4cf702de7275221edd8070adc4ef70a3d74bb
parent80972c67922a74bfd67e036629236004e905fbc9 (diff)
sctp: improve path verification
When sending path confirmation heartbeats, do not take HB.interval into account when the path is still reachable. Thanks to Alexander Funke for finding the issue and suggesting a fix. (cherry picked from commit 9312ba239e05b035c965e5790f70fe71a4ed2e8c)
-rw-r--r--sys/netinet/sctputil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 29d8c6a5e964..f2065beb2bb2 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -2300,7 +2300,8 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
} else {
to_ticks = UINT32_MAX;
}
- if (((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) &&
+ if (!((net->dest_state & SCTP_ADDR_UNCONFIRMED) &&
+ (net->dest_state & SCTP_ADDR_REACHABLE)) &&
((net->dest_state & SCTP_ADDR_PF) == 0)) {
if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) {
to_ticks += net->heart_beat_delay;