aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.c
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-02-26 16:33:54 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-26 22:27:50 +0000
commit200fa32213fce6824bcb75c907989ef8daba4a29 (patch)
tree43d54506d36ec8ce1ce05d2a7f0554c3b47ad963 /src/vnet/sctp/sctp.c
parenteacf3cfdaf04395c07830b046037f46ae94b06ab (diff)
SCTP: Handle a COOKIE ECHO/ACK when a TCB Exists
This patch addresses the requirements depicted in section 5.2.4 of the RFC 4960. It also takes care of handling the ERROR chunk and obviously the STALE COOKIE error. Change-Id: I6b88a9371546b18a52abac22f7c593a5f16be838 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.c')
-rw-r--r--src/vnet/sctp/sctp.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c
index 046eb18dcc2..20f23f22942 100644
--- a/src/vnet/sctp/sctp.c
+++ b/src/vnet/sctp/sctp.c
@@ -417,24 +417,16 @@ sctp_connection_cleanup (sctp_connection_t * sctp_conn)
&sctp_conn->sub_conn[i].connection.lcl_ip,
sctp_conn->sub_conn[i].connection.lcl_port);
- /* Check if connection is not yet fully established */
- if (sctp_conn->state == SCTP_STATE_COOKIE_WAIT)
- {
-
- }
- else
- {
- int thread_index =
- sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].connection.thread_index;
+ int thread_index =
+ sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].connection.thread_index;
- /* Make sure all timers are cleared */
- sctp_connection_timers_reset (sctp_conn);
+ /* Make sure all timers are cleared */
+ sctp_connection_timers_reset (sctp_conn);
- /* Poison the entry */
- if (CLIB_DEBUG > 0)
- memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
- pool_put (tm->connections[thread_index], sctp_conn);
- }
+ /* Poison the entry */
+ if (CLIB_DEBUG > 0)
+ memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
+ pool_put (tm->connections[thread_index], sctp_conn);
}
int