1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

When removing a stream from the output-stream-wheel, if its the

first stream we saw we must update the starting point in the
wheel, else we may loop in an endless loop.
This commit is contained in:
Randall Stewart 2007-06-15 19:49:13 +00:00
parent dda713dfb8
commit cba882dfcc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170788

View File

@ -6637,6 +6637,16 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
asoc->locked_on_sending = NULL;
strqt = sctp_select_a_stream(stcb, asoc);
if (TAILQ_FIRST(&strq->outqueue) == NULL) {
if (strq == strqn) {
/* Must move start to next one */
strqn = TAILQ_NEXT(asoc->last_out_stream, next_spoke);
if (strqn == NULL) {
strqn = TAILQ_FIRST(&asoc->out_wheel);
if (strqn == NULL) {
break;
}
}
}
sctp_remove_from_wheel(stcb, asoc, strq);
}
if (giveup) {