浏览代码

SCTP: Fix the number of HB transmissions.

Our treatment of Heartbeats is special in that the inital HB chunk
counts against the error count for the association, where as for
other chunks, only retransmissions or timeouts count against us.
As a result, we had an off-by-1 situation with a number of
Heartbeats we could send.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Vlad Yasevich 17 年之前
父节点
当前提交
fd10279bc7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sctp/sm_statefuns.c

+ 1 - 1
net/sctp/sm_statefuns.c

@@ -959,7 +959,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
 {
 {
 	struct sctp_transport *transport = (struct sctp_transport *) arg;
 	struct sctp_transport *transport = (struct sctp_transport *) arg;
 
 
-	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_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
 				SCTP_ERROR(ETIMEDOUT));
 				SCTP_ERROR(ETIMEDOUT));
 		/* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
 		/* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */