From d96bef9c7772abc56669c0ccc61bd7a03ff51a31 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 3 Dec 2015 15:19:29 +0000 Subject: Ensure that outgoing streams get reset when they run dry. MFC after: 1 week --- sys/netinet/sctp_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/netinet/sctp_output.c') diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 9b38fa53948c..55e049fa2f92 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -9897,7 +9897,6 @@ sctp_chunk_output(struct sctp_inpcb *inp, asoc = &stcb->asoc; do_it_again: /* The Nagle algorithm is only applied when handling a send call. */ - stcb->asoc.trigger_reset = 0; if (from_where == SCTP_OUTPUT_FROM_USR_SEND) { if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NODELAY)) { nagle_on = 0; @@ -9914,7 +9913,8 @@ do_it_again: if ((un_sent <= 0) && (TAILQ_EMPTY(&asoc->control_send_queue)) && (TAILQ_EMPTY(&asoc->asconf_send_queue)) && - (asoc->sent_queue_retran_cnt == 0)) { + (asoc->sent_queue_retran_cnt == 0) && + (asoc->trigger_reset == 0)) { /* Nothing to do unless there is something to be sent left */ return; } @@ -11885,6 +11885,7 @@ sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb, int so_locked) uint32_t seq; asoc = &stcb->asoc; + asoc->trigger_reset = 0; if (asoc->stream_reset_outstanding) { return (EALREADY); } -- cgit v1.2.3