diff options
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index c9f20e28521b..229690f02a1d 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -191,8 +191,8 @@ static inline int sctp_cacc_skip(struct sctp_transport *primary, | |||
191 | __u32 tsn) | 191 | __u32 tsn) |
192 | { | 192 | { |
193 | if (primary->cacc.changeover_active && | 193 | if (primary->cacc.changeover_active && |
194 | (sctp_cacc_skip_3_1(primary, transport, count_of_newacks) | 194 | (sctp_cacc_skip_3_1(primary, transport, count_of_newacks) || |
195 | || sctp_cacc_skip_3_2(primary, tsn))) | 195 | sctp_cacc_skip_3_2(primary, tsn))) |
196 | return 1; | 196 | return 1; |
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
@@ -423,16 +423,6 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
423 | if ((reason == SCTP_RTXR_FAST_RTX && | 423 | if ((reason == SCTP_RTXR_FAST_RTX && |
424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || | 424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || |
425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { | 425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { |
426 | /* If this chunk was sent less then 1 rto ago, do not | ||
427 | * retransmit this chunk, but give the peer time | ||
428 | * to acknowlege it. Do this only when | ||
429 | * retransmitting due to T3 timeout. | ||
430 | */ | ||
431 | if (reason == SCTP_RTXR_T3_RTX && | ||
432 | time_before(jiffies, chunk->sent_at + | ||
433 | transport->last_rto)) | ||
434 | continue; | ||
435 | |||
436 | /* RFC 2960 6.2.1 Processing a Received SACK | 426 | /* RFC 2960 6.2.1 Processing a Received SACK |
437 | * | 427 | * |
438 | * C) Any time a DATA chunk is marked for | 428 | * C) Any time a DATA chunk is marked for |
@@ -931,6 +921,14 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
931 | goto sctp_flush_out; | 921 | goto sctp_flush_out; |
932 | } | 922 | } |
933 | 923 | ||
924 | /* Apply Max.Burst limitation to the current transport in | ||
925 | * case it will be used for new data. We are going to | ||
926 | * rest it before we return, but we want to apply the limit | ||
927 | * to the currently queued data. | ||
928 | */ | ||
929 | if (transport) | ||
930 | sctp_transport_burst_limited(transport); | ||
931 | |||
934 | /* Finally, transmit new packets. */ | 932 | /* Finally, transmit new packets. */ |
935 | while ((chunk = sctp_outq_dequeue_data(q)) != NULL) { | 933 | while ((chunk = sctp_outq_dequeue_data(q)) != NULL) { |
936 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid | 934 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid |
@@ -976,6 +974,10 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
976 | packet = &transport->packet; | 974 | packet = &transport->packet; |
977 | sctp_packet_config(packet, vtag, | 975 | sctp_packet_config(packet, vtag, |
978 | asoc->peer.ecn_capable); | 976 | asoc->peer.ecn_capable); |
977 | /* We've switched transports, so apply the | ||
978 | * Burst limit to the new transport. | ||
979 | */ | ||
980 | sctp_transport_burst_limited(transport); | ||
979 | } | 981 | } |
980 | 982 | ||
981 | SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ", | 983 | SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ", |
@@ -1011,6 +1013,13 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
1011 | break; | 1013 | break; |
1012 | 1014 | ||
1013 | case SCTP_XMIT_OK: | 1015 | case SCTP_XMIT_OK: |
1016 | /* The sender is in the SHUTDOWN-PENDING state, | ||
1017 | * The sender MAY set the I-bit in the DATA | ||
1018 | * chunk header. | ||
1019 | */ | ||
1020 | if (asoc->state == SCTP_STATE_SHUTDOWN_PENDING) | ||
1021 | chunk->chunk_hdr->flags |= SCTP_DATA_SACK_IMM; | ||
1022 | |||
1014 | break; | 1023 | break; |
1015 | 1024 | ||
1016 | default: | 1025 | default: |
@@ -1063,6 +1072,9 @@ sctp_flush_out: | |||
1063 | packet = &t->packet; | 1072 | packet = &t->packet; |
1064 | if (!sctp_packet_empty(packet)) | 1073 | if (!sctp_packet_empty(packet)) |
1065 | error = sctp_packet_transmit(packet); | 1074 | error = sctp_packet_transmit(packet); |
1075 | |||
1076 | /* Clear the burst limited state, if any */ | ||
1077 | sctp_transport_burst_reset(t); | ||
1066 | } | 1078 | } |
1067 | 1079 | ||
1068 | return error; | 1080 | return error; |