sctp: fix heartbeat process for association
Subsystems (2)
PATCH 1/2 sctp: fix heartbeat process for association
RFC4960 Section 8.1 defined that the association should enter CLOSE state when the value of association error counter exceeds the limit indicated in the protocol parameter 'Association.Max.Retrans'. This means that the association should enter CLOSE state after max_retrans+1 heartbeats are not acknowledged.
--- net/sctp/sm_statefuns.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
net/sctp/sm_statefuns.c +3 -3
@@ -5190,7 +5190,7 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(const struct sctp_endpoint *ep,SCTP_INC_STATS (SCTP_MIB_T3_RTX_EXPIREDS ); -if (asoc->overall_error_count >= asoc->max_retrans) { +if (asoc->overall_error_count > asoc->max_retrans) {sctp_add_cmd_sf (commands,SCTP_CMD_SET_SK_ERR ,SCTP_ERROR (ETIMEDOUT ));/* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
@@ -5404,7 +5404,7 @@ sctp_disposition_t sctp_sf_t2_timer_expire(const struct sctp_endpoint *ep, ((struct sctp_association *)asoc)->shutdown_retries++; -if (asoc->overall_error_count >= asoc->max_retrans) { +if (asoc->overall_error_count > asoc->max_retrans) {sctp_add_cmd_sf (commands,SCTP_CMD_SET_SK_ERR ,SCTP_ERROR (ETIMEDOUT ));/* Note: CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
@@ -5487,7 +5487,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire(* RFC2960 [5] section 8.1 and 8.2. * association error counter is incremented in SCTP_CMD_STRIKE. */ -if (asoc->overall_error_count >= asoc->max_retrans) { +if (asoc->overall_error_count > asoc->max_retrans) {sctp_add_cmd_sf (commands,SCTP_CMD_TIMER_STOP ,SCTP_TO (SCTP_EVENT_TIMEOUT_T4_RTO )); sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
Signature · 1 line
1.6.4
PATCH 2/2 sctp: fix heartbeat process of path failure
RFC4960 Section 8.2 defined that the transport should enter INACTIVE state only when the value in the error counter exceeds the protocol parameter 'Path.Max.Retrans' of that destination address. This means that the transport should enter INACTIVE state after pathmaxrxt+1 heartbeats are not acknowledged.
--- net/sctp/sm_sideeffect.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/sctp/sm_sideeffect.c +1 -1
@@ -447,7 +447,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, asoc->overall_error_count++;if (transport->state !=SCTP_INACTIVE && - (transport->error_count++ >= transport->pathmaxrxt)) { + (transport->error_count++ > transport->pathmaxrxt)) { SCTP_DEBUG_PRINTK_IPADDR("transport_strike:association %p", " transport IP: port:%d failed.\n", asoc,
Signature · 1 line
1.6.4
David Miller
maintainerFrom: Chunbo Luo <[email protected]>
Date: Tue, 18 Aug 2009 11:24:15 +0800
Quoted 7 lines
RFC4960 Section 8.1 defined that the association should enter CLOSE state when the value of association error counter exceeds the limit indicated in the protocol parameter 'Association.Max.Retrans'. This means that the association should enter CLOSE state after max_retrans+1 heartbeats are not acknowledged.
Signed-off-by Chunbo Luo <[email protected]>
Please post SCTP patches CC:'d to netdev and linux-sctp so it can reach the maintainers and get properly tracked in patchwork
Thanks