diff options
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index d68aa33485a9..d74d00b29942 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -80,7 +80,7 @@ static inline void sctp_outq_head_data(struct sctp_outq *q, | |||
80 | q->out_qlen += ch->skb->len; | 80 | q->out_qlen += ch->skb->len; |
81 | 81 | ||
82 | stream = sctp_chunk_stream_no(ch); | 82 | stream = sctp_chunk_stream_no(ch); |
83 | oute = q->asoc->stream.out[stream].ext; | 83 | oute = SCTP_SO(&q->asoc->stream, stream)->ext; |
84 | list_add(&ch->stream_list, &oute->outq); | 84 | list_add(&ch->stream_list, &oute->outq); |
85 | } | 85 | } |
86 | 86 | ||
@@ -101,7 +101,7 @@ static inline void sctp_outq_tail_data(struct sctp_outq *q, | |||
101 | q->out_qlen += ch->skb->len; | 101 | q->out_qlen += ch->skb->len; |
102 | 102 | ||
103 | stream = sctp_chunk_stream_no(ch); | 103 | stream = sctp_chunk_stream_no(ch); |
104 | oute = q->asoc->stream.out[stream].ext; | 104 | oute = SCTP_SO(&q->asoc->stream, stream)->ext; |
105 | list_add_tail(&ch->stream_list, &oute->outq); | 105 | list_add_tail(&ch->stream_list, &oute->outq); |
106 | } | 106 | } |
107 | 107 | ||
@@ -372,7 +372,7 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc, | |||
372 | sctp_insert_list(&asoc->outqueue.abandoned, | 372 | sctp_insert_list(&asoc->outqueue.abandoned, |
373 | &chk->transmitted_list); | 373 | &chk->transmitted_list); |
374 | 374 | ||
375 | streamout = &asoc->stream.out[chk->sinfo.sinfo_stream]; | 375 | streamout = SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream); |
376 | asoc->sent_cnt_removable--; | 376 | asoc->sent_cnt_removable--; |
377 | asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; | 377 | asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; |
378 | streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; | 378 | streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; |
@@ -416,7 +416,7 @@ static int sctp_prsctp_prune_unsent(struct sctp_association *asoc, | |||
416 | asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; | 416 | asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; |
417 | if (chk->sinfo.sinfo_stream < asoc->stream.outcnt) { | 417 | if (chk->sinfo.sinfo_stream < asoc->stream.outcnt) { |
418 | struct sctp_stream_out *streamout = | 418 | struct sctp_stream_out *streamout = |
419 | &asoc->stream.out[chk->sinfo.sinfo_stream]; | 419 | SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream); |
420 | 420 | ||
421 | streamout->ext->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; | 421 | streamout->ext->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; |
422 | } | 422 | } |
@@ -1082,6 +1082,7 @@ static void sctp_outq_flush_data(struct sctp_flush_ctx *ctx, | |||
1082 | /* Finally, transmit new packets. */ | 1082 | /* Finally, transmit new packets. */ |
1083 | while ((chunk = sctp_outq_dequeue_data(ctx->q)) != NULL) { | 1083 | while ((chunk = sctp_outq_dequeue_data(ctx->q)) != NULL) { |
1084 | __u32 sid = ntohs(chunk->subh.data_hdr->stream); | 1084 | __u32 sid = ntohs(chunk->subh.data_hdr->stream); |
1085 | __u8 stream_state = SCTP_SO(&ctx->asoc->stream, sid)->state; | ||
1085 | 1086 | ||
1086 | /* Has this chunk expired? */ | 1087 | /* Has this chunk expired? */ |
1087 | if (sctp_chunk_abandoned(chunk)) { | 1088 | if (sctp_chunk_abandoned(chunk)) { |
@@ -1091,7 +1092,7 @@ static void sctp_outq_flush_data(struct sctp_flush_ctx *ctx, | |||
1091 | continue; | 1092 | continue; |
1092 | } | 1093 | } |
1093 | 1094 | ||
1094 | if (ctx->asoc->stream.out[sid].state == SCTP_STREAM_CLOSED) { | 1095 | if (stream_state == SCTP_STREAM_CLOSED) { |
1095 | sctp_outq_head_data(ctx->q, chunk); | 1096 | sctp_outq_head_data(ctx->q, chunk); |
1096 | break; | 1097 | break; |
1097 | } | 1098 | } |