svn commit: r231472 - stable/8/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri Feb 10 23:26:44 UTC 2012
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) {
More information about the svn-src-stable
mailing list