aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/outqueue.c15
-rw-r--r--net/sctp/transport.c4
2 files changed, 5 insertions, 14 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 4e551ba8998c..786c4ff97ae4 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -659,14 +659,6 @@ redo:
659 if (chunk->fast_retransmit == SCTP_NEED_FRTX) 659 if (chunk->fast_retransmit == SCTP_NEED_FRTX)
660 chunk->fast_retransmit = SCTP_DONT_FRTX; 660 chunk->fast_retransmit = SCTP_DONT_FRTX;
661 661
662 /* Force start T3-rtx timer when fast retransmitting
663 * the earliest outstanding TSN
664 */
665 if (!timer && fast_rtx &&
666 ntohl(chunk->subh.data_hdr->tsn) ==
667 asoc->ctsn_ack_point + 1)
668 timer = 2;
669
670 q->empty = 0; 662 q->empty = 0;
671 break; 663 break;
672 } 664 }
@@ -871,7 +863,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
871 * sender MUST assure that at least one T3-rtx 863 * sender MUST assure that at least one T3-rtx
872 * timer is running. 864 * timer is running.
873 */ 865 */
874 sctp_transport_reset_timers(transport, 0); 866 sctp_transport_reset_timers(transport);
875 } 867 }
876 break; 868 break;
877 869
@@ -924,8 +916,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
924 rtx_timeout, &start_timer); 916 rtx_timeout, &start_timer);
925 917
926 if (start_timer) 918 if (start_timer)
927 sctp_transport_reset_timers(transport, 919 sctp_transport_reset_timers(transport);
928 start_timer-1);
929 920
930 /* This can happen on COOKIE-ECHO resend. Only 921 /* This can happen on COOKIE-ECHO resend. Only
931 * one chunk can get bundled with a COOKIE-ECHO. 922 * one chunk can get bundled with a COOKIE-ECHO.
@@ -1058,7 +1049,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
1058 list_add_tail(&chunk->transmitted_list, 1049 list_add_tail(&chunk->transmitted_list,
1059 &transport->transmitted); 1050 &transport->transmitted);
1060 1051
1061 sctp_transport_reset_timers(transport, 0); 1052 sctp_transport_reset_timers(transport);
1062 1053
1063 q->empty = 0; 1054 q->empty = 0;
1064 1055
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index be4d63d5a5cc..0ebb97fc98e0 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -195,7 +195,7 @@ static void sctp_transport_destroy(struct sctp_transport *transport)
195/* Start T3_rtx timer if it is not already running and update the heartbeat 195/* Start T3_rtx timer if it is not already running and update the heartbeat
196 * timer. This routine is called every time a DATA chunk is sent. 196 * timer. This routine is called every time a DATA chunk is sent.
197 */ 197 */
198void sctp_transport_reset_timers(struct sctp_transport *transport, int force) 198void sctp_transport_reset_timers(struct sctp_transport *transport)
199{ 199{
200 /* RFC 2960 6.3.2 Retransmission Timer Rules 200 /* RFC 2960 6.3.2 Retransmission Timer Rules
201 * 201 *
@@ -205,7 +205,7 @@ void sctp_transport_reset_timers(struct sctp_transport *transport, int force)
205 * address. 205 * address.
206 */ 206 */
207 207
208 if (force || !timer_pending(&transport->T3_rtx_timer)) 208 if (!timer_pending(&transport->T3_rtx_timer))
209 if (!mod_timer(&transport->T3_rtx_timer, 209 if (!mod_timer(&transport->T3_rtx_timer,
210 jiffies + transport->rto)) 210 jiffies + transport->rto))
211 sctp_transport_hold(transport); 211 sctp_transport_hold(transport);