aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.c
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-03-05 12:31:45 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-05 13:46:32 +0000
commit9e09ff394ac0e731b5b33caf4d0cddff8de570b4 (patch)
tree5fdb5784570dadce34afc4cfe824f51a3f00e948 /src/vnet/sctp/sctp.c
parenteac3b11b67a9ee2d5b85c3e2e90220a04cd5db61 (diff)
SCTP: retransmission in INIT/SHUTDOWN phase
This patch addresses the need to handle timers timeouts (e.g. sent chunks not being acked) for both the INIT and SHUTDOWN phases. The INIT phase requires the handling of two timers the T1-init and T1-cookie timers whilst the SHUTDOWN phase requires the handling of the T2-shutdown timer only for the retransmission case. Left to be implemented is the handling of the DATA chunks retransmission (e.g. T3-rxtx expiration) but that will be submitted with a separate patch. Change-Id: I2b2e13dce11000aea3c7d965f02b27b76c97e605 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.c')
-rw-r--r--src/vnet/sctp/sctp.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c
index df5d86094a5..0e086a1f072 100644
--- a/src/vnet/sctp/sctp.c
+++ b/src/vnet/sctp/sctp.c
@@ -680,19 +680,6 @@ sctp_expired_timers_cb (u32 conn_index, u32 timer_id)
SCTP_DBG ("%s expired", sctp_timer_to_string (timer_id));
- switch (timer_id)
- {
- case SCTP_TIMER_T1_INIT:
- case SCTP_TIMER_T1_COOKIE:
- case SCTP_TIMER_T2_SHUTDOWN:
- case SCTP_TIMER_T3_RXTX:
- sctp_timer_reset (sctp_conn, conn_index, timer_id);
- break;
- case SCTP_TIMER_T4_HEARTBEAT:
- sctp_timer_reset (sctp_conn, conn_index, timer_id);
- goto heartbeat;
- }
-
if (sctp_conn->sub_conn[conn_index].unacknowledged_hb >
SCTP_PATH_MAX_RETRANS)
{
@@ -722,6 +709,27 @@ sctp_expired_timers_cb (u32 conn_index, u32 timer_id)
sctp_connection_cleanup (sctp_conn);
}
+ return;
+ }
+
+ switch (timer_id)
+ {
+ case SCTP_TIMER_T1_INIT:
+ sctp_send_init (sctp_conn);
+ break;
+ case SCTP_TIMER_T1_COOKIE:
+ sctp_send_cookie_echo (sctp_conn);
+ break;
+ case SCTP_TIMER_T2_SHUTDOWN:
+ sctp_send_shutdown (sctp_conn);
+ break;
+ case SCTP_TIMER_T3_RXTX:
+ sctp_timer_reset (sctp_conn, conn_index, timer_id);
+ sctp_data_retransmit (sctp_conn);
+ break;
+ case SCTP_TIMER_T4_HEARTBEAT:
+ sctp_timer_reset (sctp_conn, conn_index, timer_id);
+ goto heartbeat;
}
return;