aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2022-05-14 06:05:03 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2022-05-14 06:05:03 +0000
commit9312ba239e05b035c965e5790f70fe71a4ed2e8c (patch)
treeb9d0fe8e2d2f0e6dd2b12d2e9947094c77624769 /sys/netinet/sctputil.c
parent9b2a35b3a96b44019d7884da9de92c4f92d64994 (diff)
downloadsrc-9312ba239e05b035c965e5790f70fe71a4ed2e8c.tar.gz
src-9312ba239e05b035c965e5790f70fe71a4ed2e8c.zip
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. MFC after: 3 days
Diffstat (limited to 'sys/netinet/sctputil.c')
-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 7ac6ce6177d0..1f0b52a205fa 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;