diff options
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index db352e5d61f8..8081476ed313 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -382,17 +382,18 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc, | |||
382 | } | 382 | } |
383 | 383 | ||
384 | static int sctp_prsctp_prune_unsent(struct sctp_association *asoc, | 384 | static int sctp_prsctp_prune_unsent(struct sctp_association *asoc, |
385 | struct sctp_sndrcvinfo *sinfo, | 385 | struct sctp_sndrcvinfo *sinfo, int msg_len) |
386 | struct list_head *queue, int msg_len) | ||
387 | { | 386 | { |
387 | struct sctp_outq *q = &asoc->outqueue; | ||
388 | struct sctp_chunk *chk, *temp; | 388 | struct sctp_chunk *chk, *temp; |
389 | 389 | ||
390 | list_for_each_entry_safe(chk, temp, queue, list) { | 390 | list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) { |
391 | if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) || | 391 | if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) || |
392 | chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive) | 392 | chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive) |
393 | continue; | 393 | continue; |
394 | 394 | ||
395 | list_del_init(&chk->list); | 395 | list_del_init(&chk->list); |
396 | q->out_qlen -= chk->skb->len; | ||
396 | asoc->sent_cnt_removable--; | 397 | asoc->sent_cnt_removable--; |
397 | asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; | 398 | asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; |
398 | 399 | ||
@@ -431,9 +432,7 @@ void sctp_prsctp_prune(struct sctp_association *asoc, | |||
431 | return; | 432 | return; |
432 | } | 433 | } |
433 | 434 | ||
434 | sctp_prsctp_prune_unsent(asoc, sinfo, | 435 | sctp_prsctp_prune_unsent(asoc, sinfo, msg_len); |
435 | &asoc->outqueue.out_chunk_list, | ||
436 | msg_len); | ||
437 | } | 436 | } |
438 | 437 | ||
439 | /* Mark all the eligible packets on a transport for retransmission. */ | 438 | /* Mark all the eligible packets on a transport for retransmission. */ |
@@ -1027,8 +1026,7 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) | |||
1027 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid | 1026 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid |
1028 | * stream identifier. | 1027 | * stream identifier. |
1029 | */ | 1028 | */ |
1030 | if (chunk->sinfo.sinfo_stream >= | 1029 | if (chunk->sinfo.sinfo_stream >= asoc->stream->outcnt) { |
1031 | asoc->c.sinit_num_ostreams) { | ||
1032 | 1030 | ||
1033 | /* Mark as failed send. */ | 1031 | /* Mark as failed send. */ |
1034 | sctp_chunk_fail(chunk, SCTP_ERROR_INV_STRM); | 1032 | sctp_chunk_fail(chunk, SCTP_ERROR_INV_STRM); |