Send out control chunks which have no specific destination.

MFC after: 3 days.
This commit is contained in:
Michael Tuexen 2011-10-27 22:37:59 +00:00
parent 941a6e134b
commit a0fe4c5b36
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226868

View File

@ -8003,12 +8003,20 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
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 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
*/
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 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
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 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
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) {