From owner-svn-src-stable@FreeBSD.ORG Fri Feb 10 23:26:44 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2617E106566C; Fri, 10 Feb 2012 23:26:44 +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 EE8FE8FC08; Fri, 10 Feb 2012 23:26:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1ANQhDf001717; Fri, 10 Feb 2012 23:26:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1ANQhVB001715; Fri, 10 Feb 2012 23:26:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201202102326.q1ANQhVB001715@svn.freebsd.org> From: Michael Tuexen Date: Fri, 10 Feb 2012 23:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231472 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 23:26:44 -0000 Author: tuexen Date: Fri Feb 10 23:26:43 2012 New Revision: 231472 URL: http://svn.freebsd.org/changeset/base/231472 Log: MFC r226868: Send out control chunks which have no specific destination. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Fri Feb 10 23:24:34 2012 (r231471) +++ stable/8/sys/netinet/sctp_output.c Fri Feb 10 23:26:43 2012 (r231472) @@ -8003,12 +8003,20 @@ again_one_more_time: if (chk->rec.chunk_id.id != SCTP_ASCONF) { continue; } - if (chk->whoTo != net) { - /* - * No, not sent to the network we are - * looking at - */ - break; + if (chk->whoTo == NULL) { + if (asoc->alternate == NULL) { + if (asoc->primary_destination != net) { + break; + } + } else { + if (asoc->alternate != net) { + break; + } + } + } else { + if (chk->whoTo != net) { + break; + } } if (chk->data == NULL) { break; @@ -8092,6 +8100,10 @@ again_one_more_time: */ no_data_chunks = 1; chk->sent = SCTP_DATAGRAM_SENT; + if (chk->whoTo == NULL) { + chk->whoTo = net; + atomic_add_int(&net->ref_count, 1); + } chk->snd_count++; if (mtu == 0) { /* @@ -8198,12 +8210,20 @@ again_one_more_time: goto skip_net_check; } } - if (chk->whoTo != net) { - /* - * No, not sent to the network we are - * looking at - */ - continue; + if (chk->whoTo == NULL) { + if (asoc->alternate == NULL) { + if (asoc->primary_destination != net) { + continue; + } + } else { + if (asoc->alternate != net) { + continue; + } + } + } else { + if (chk->whoTo != net) { + continue; + } } skip_net_check: if (chk->data == NULL) { @@ -8332,6 +8352,10 @@ again_one_more_time: SCTP_STAT_INCR(sctps_sendecne); } chk->sent = SCTP_DATAGRAM_SENT; + if (chk->whoTo == NULL) { + chk->whoTo = net; + atomic_add_int(&net->ref_count, 1); + } chk->snd_count++; } if (mtu == 0) {