From owner-svn-src-head@FreeBSD.ORG Thu Oct 27 22:38:00 2011 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 23ED71065745; Thu, 27 Oct 2011 22:38:00 +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 EF2228FC08; Thu, 27 Oct 2011 22:37:59 +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 p9RMbxQb028817; Thu, 27 Oct 2011 22:37:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RMbxW9028815; Thu, 27 Oct 2011 22:37:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110272237.p9RMbxW9028815@svn.freebsd.org> From: Michael Tuexen Date: Thu, 27 Oct 2011 22:37:59 +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: r226868 - 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: Thu, 27 Oct 2011 22:38:00 -0000 Author: tuexen Date: Thu Oct 27 22:37:59 2011 New Revision: 226868 URL: http://svn.freebsd.org/changeset/base/226868 Log: Send out control chunks which have no specific destination. MFC after: 3 days. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Oct 27 22:10:52 2011 (r226867) +++ head/sys/netinet/sctp_output.c Thu Oct 27 22:37:59 2011 (r226868) @@ -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) {