summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-06-15 19:49:13 +0000
committerrrs <rrs@FreeBSD.org>2007-06-15 19:49:13 +0000
commitcca3bf1d354280836311aca130658d955e2db2c8 (patch)
tree1562a45736961a03b2ad3f06ddfd402cdecceae8 /sys/netinet/sctp_output.c
parent6164fe7d05f57ab5c751e88754b28a2ab003297e (diff)
downloadFreeBSD-src-cca3bf1d354280836311aca130658d955e2db2c8.zip
FreeBSD-src-cca3bf1d354280836311aca130658d955e2db2c8.tar.gz
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.
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 1c52c33..51ae99e 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -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) {
OpenPOWER on IntegriCloud