diff options
author | tuexen <tuexen@FreeBSD.org> | 2016-01-17 12:02:04 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2016-01-17 12:02:04 +0000 |
commit | 606cd2bce64d7a59b32df1a66f66c3b70a842d1b (patch) | |
tree | 18c33f31d9577ef6ebe601fd1226b83b42ec2e8f | |
parent | 6d8c03a8e795bf7dbca0e4e614e86e0496d674cb (diff) | |
download | FreeBSD-src-606cd2bce64d7a59b32df1a66f66c3b70a842d1b.zip FreeBSD-src-606cd2bce64d7a59b32df1a66f66c3b70a842d1b.tar.gz |
MFC r291410:
Take also the send queue and sent queue into account when triggering
the sending of outgoing stream reset requests.
-rw-r--r-- | sys/netinet/sctp_output.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 03b5ef2..6cf7dc6 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -7169,7 +7169,8 @@ one_more_time: } atomic_subtract_int(&asoc->stream_queue_cnt, 1); TAILQ_REMOVE(&strq->outqueue, sp, next); - if (strq->state == SCTP_STREAM_RESET_PENDING && + if ((strq->state == SCTP_STREAM_RESET_PENDING) && + (strq->chunks_on_queues == 0) && TAILQ_EMPTY(&strq->outqueue)) { stcb->asoc.trigger_reset = 1; } @@ -7571,7 +7572,8 @@ dont_do_it: send_lock_up = 1; } TAILQ_REMOVE(&strq->outqueue, sp, next); - if (strq->state == SCTP_STREAM_RESET_PENDING && + if ((strq->state == SCTP_STREAM_RESET_PENDING) && + (strq->chunks_on_queues == 0) && TAILQ_EMPTY(&strq->outqueue)) { stcb->asoc.trigger_reset = 1; } @@ -11577,7 +11579,8 @@ sctp_add_stream_reset_out(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, /* now how long will this param be? */ for (i = 0; i < stcb->asoc.streamoutcnt; i++) { if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) && - (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) { + (stcb->asoc.strmout[i].chunks_on_queues == 0) && + TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) { number_entries++; } } @@ -11600,7 +11603,8 @@ sctp_add_stream_reset_out(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, if (number_entries) { for (i = 0; i < stcb->asoc.streamoutcnt; i++) { if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) && - (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) { + (stcb->asoc.strmout[i].chunks_on_queues == 0) && + TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) { req_out->list_of_streams[at] = htons(i); at++; stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_IN_FLIGHT; |