sctp_conn->remote_initial_tsn);
sctp_conn->peer_rwnd = clib_net_to_host_u32 (init_chunk->a_rwnd);
-
/*
* If the length specified in the INIT message is bigger than the size in bytes of our structure it means that
* optional parameters have been sent with the INIT chunk and we need to parse them.
return 0;
}
- if (is_gapping != 0)
+ if (is_gapping)
{
SCTP_CONN_TRACKING_DBG
("gapping != 0: CONN_INDEX = %u, sctp_conn->ack_state = %u",
return 0;
}
+ sctp_conn->ack_state += 1;
if (sctp_conn->ack_state >= MAX_ENQUEABLE_SACKS)
{
SCTP_CONN_TRACKING_DBG
return 0;
}
- sctp_conn->ack_state += 1;
-
return 1;
}
}
sctp_conn->last_rcvd_tsn = tsn;
- *next0 = sctp_next_drop (sctp_conn->sub_conn[idx].c_is_ip4);
-
SCTP_ADV_DBG ("POINTER_WITH_DATA = %p", b->data);
if (!sctp_is_sack_delayable (sctp_conn, idx, is_gapping))
- sctp_prepare_sack_chunk (sctp_conn, idx, b);
+ {
+ *next0 = sctp_next_output (sctp_conn->sub_conn[idx].c_is_ip4);
+ sctp_prepare_sack_chunk (sctp_conn, idx, b);
+ }
+ else
+ *next0 = sctp_next_drop (sctp_conn->sub_conn[idx].c_is_ip4);
sctp_conn->sub_conn[idx].enqueue_state = error;
sctp_connection_timers_init (new_sctp_conn);
+ sctp_init_cwnd (new_sctp_conn);
+
error0 =
sctp_handle_init_ack (sctp_hdr, sctp_chunk_hdr,
new_sctp_conn, idx, b0,
sctp_implied_length);
- sctp_init_cwnd (new_sctp_conn);
-
if (session_stream_connect_notify
(&new_sctp_conn->sub_conn[idx].connection, 0))
{
sctp_connection_t * sctp_conn, u8 idx, vlib_buffer_t * b0,
u16 * next0)
{
+
/* Check that the LOCALLY generated tag is being used by the REMOTE peer as the verification tag */
if (sctp_conn->local_tag != sack_chunk->sctp_hdr.verification_tag)
{
return SCTP_ERROR_INVALID_TAG;
}
+ sctp_conn->sub_conn[idx].state = SCTP_SUBCONN_SACK_RECEIVED;
+
sctp_conn->sub_conn[idx].last_seen = sctp_time_now ();
/* Section 7.2.2; point (2) */
sctp_init_snd_vars (child_conn);
+ sctp_init_cwnd (child_conn);
+
error0 =
sctp_handle_init (sctp_hdr, sctp_chunk_hdr, child_conn, b0,
sctp_implied_length);
- sctp_init_cwnd (child_conn);
-
if (error0 == SCTP_ERROR_NONE)
{
if (stream_session_accept