From owner-svn-src-head@FreeBSD.ORG Wed Aug 19 12:02:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72F591065691; Wed, 19 Aug 2009 12:02:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65F228FC66; Wed, 19 Aug 2009 12:02:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7JC2Sgl053641; Wed, 19 Aug 2009 12:02:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7JC2STC053639; Wed, 19 Aug 2009 12:02:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200908191202.n7JC2STC053639@svn.freebsd.org> From: Michael Tuexen Date: Wed, 19 Aug 2009 12:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196376 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2009 12:02:28 -0000 Author: tuexen Date: Wed Aug 19 12:02:28 2009 New Revision: 196376 URL: http://svn.freebsd.org/changeset/base/196376 Log: Fix a bug in the handling of unreliable messages which results in stalled associations. Approved by: re, rrs (mentor) MFC after: immediately Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Aug 19 03:58:12 2009 (r196375) +++ head/sys/netinet/sctputil.c Wed Aug 19 12:02:28 2009 (r196376) @@ -4667,8 +4667,10 @@ sctp_release_pr_sctp_chunk(struct sctp_t stcb->asoc.peers_rwnd += tp1->send_size; stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); - sctp_m_freem(tp1->data); - tp1->data = NULL; + if (tp1->data) { + sctp_m_freem(tp1->data); + tp1->data = NULL; + } do_wakeup_routine = 1; if (PR_SCTP_BUF_ENABLED(tp1->flags)) { stcb->asoc.sent_queue_cnt_removeable--; @@ -4715,12 +4717,14 @@ next_on_sent: */ chk = tp1; ret_sz += tp1->book_size; - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); - sctp_m_freem(tp1->data); + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (tp1->data) { + sctp_m_freem(tp1->data); + tp1->data = NULL; + } /* No flight involved here book the size to 0 */ tp1->book_size = 0; - tp1->data = NULL; if (tp1->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { foundeom = 1; }