From patchwork Wed Aug 19 07:01:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chunbo.luo@windriver.com X-Patchwork-Id: 31633 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 48F95B7067 for ; Wed, 19 Aug 2009 17:01:48 +1000 (EST) Received: by ozlabs.org (Postfix) id 38B9BDDDA0; Wed, 19 Aug 2009 17:01:48 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C01F6DDD1B for ; Wed, 19 Aug 2009 17:01:47 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751401AbZHSHBR (ORCPT ); Wed, 19 Aug 2009 03:01:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751359AbZHSHBQ (ORCPT ); Wed, 19 Aug 2009 03:01:16 -0400 Received: from mail.windriver.com ([147.11.1.11]:36897 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbZHSHBN (ORCPT ); Wed, 19 Aug 2009 03:01:13 -0400 Received: from localhost.localdomain (pek-lpgbuild6.wrs.com [128.224.153.36]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id n7J719bJ019245; Wed, 19 Aug 2009 00:01:12 -0700 (PDT) From: Chunbo Luo To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, chunbo.luo@windriver.com Subject: [PATCH 2/2] sctp: fix heartbeat count of path failure Date: Wed, 19 Aug 2009 15:01:08 +0800 Message-Id: <1250665268-29770-2-git-send-email-chunbo.luo@windriver.com> X-Mailer: git-send-email 1.6.4 In-Reply-To: <1250665268-29770-1-git-send-email-chunbo.luo@windriver.com> References: <1250665268-29770-1-git-send-email-chunbo.luo@windriver.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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. Signed-off-by: Chunbo Luo --- net/sctp/sm_sideeffect.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 86426aa..0e2e269 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -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,