aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp_input.c
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-02-21 12:39:52 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-21 19:22:39 +0000
commit15cc6a83f1369d77955bc5cb2d398f43f8100e69 (patch)
tree0d6d9664f0e76cb50ad1fa96f425bbddb813b15a /src/vnet/sctp/sctp_input.c
parentfa5fb2d162b0b88d8c59bf2664224948956e4ac4 (diff)
SCTP: minor refactor
This patch adds some missing information in various debugging messages which can help with debugging state-machine and connection-tracking. It also renames some internal variable names for better code readibility. Change-Id: I68503fc0214300032f7514426c8b5b2b12edf11a Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp_input.c')
-rw-r--r--src/vnet/sctp/sctp_input.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/vnet/sctp/sctp_input.c b/src/vnet/sctp/sctp_input.c
index 35218d5dd62..d3e69c68ba0 100644
--- a/src/vnet/sctp/sctp_input.c
+++ b/src/vnet/sctp/sctp_input.c
@@ -537,8 +537,6 @@ sctp_handle_init_ack (sctp_header_t * sctp_hdr,
sctp_timer_set (sctp_conn, idx,
SCTP_TIMER_T1_COOKIE, sctp_conn->sub_conn[idx].RTO);
- stream_session_accept_notify (&sctp_conn->sub_conn[idx].connection);
-
return SCTP_ERROR_NONE;
}
@@ -806,6 +804,8 @@ sctp_handle_cookie_echo (sctp_header_t * sctp_hdr,
sctp_timer_set (sctp_conn, idx, SCTP_TIMER_T4_HEARTBEAT,
sctp_conn->sub_conn[idx].RTO);
+ stream_session_accept_notify (&sctp_conn->sub_conn[idx].connection);
+
return SCTP_ERROR_NONE;
}
@@ -834,6 +834,8 @@ sctp_handle_cookie_ack (sctp_header_t * sctp_hdr,
sctp_timer_set (sctp_conn, idx, SCTP_TIMER_T4_HEARTBEAT,
sctp_conn->sub_conn[idx].RTO);
+ stream_session_accept_notify (&sctp_conn->sub_conn[idx].connection);
+
return SCTP_ERROR_NONE;
}
@@ -2084,10 +2086,13 @@ sctp46_input_dispatcher (vlib_main_t * vm, vlib_node_runtime_t * node,
error0 = tm->dispatch_table[sctp_conn->state][chunk_type].error;
SCTP_DBG_STATE_MACHINE
- ("SESSION_INDEX = %u, CURRENT_CONNECTION_STATE = %s,"
+ ("S_INDEX = %u, C_INDEX = %u, TRANS_CONN = %p, SCTP_CONN = %p, CURRENT_CONNECTION_STATE = %s,"
"CHUNK_TYPE_RECEIVED = %s " "NEXT_PHASE = %s",
sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].
- connection.s_index, sctp_state_to_string (sctp_conn->state),
+ connection.s_index,
+ sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].
+ connection.c_index, trans_conn, sctp_conn,
+ sctp_state_to_string (sctp_conn->state),
sctp_chunk_to_string (chunk_type), phase_to_string (next0));
if (chunk_type == DATA)