From eacf3cfdaf04395c07830b046037f46ae94b06ab Mon Sep 17 00:00:00 2001 From: Marco Varlese Date: Mon, 26 Feb 2018 14:52:25 +0100 Subject: SCTP: handle INIT corner-case handling As per RFC4960 the INIT chunk could be received in unexpected scenarios and - depending on the state of the internal state-machine - the INIT chunk requires different treatment. This patch addresses section 5.2.1 and 5.2.2 of the RFC4960. Change-Id: Ib23ef490c6a5ca3da6c46a9584b75e7577cb7042 Signed-off-by: Marco Varlese --- src/vnet/sctp/sctp.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/vnet/sctp/sctp.h') diff --git a/src/vnet/sctp/sctp.h b/src/vnet/sctp/sctp.h index 048d153ac55..de5eb8f6685 100644 --- a/src/vnet/sctp/sctp.h +++ b/src/vnet/sctp/sctp.h @@ -237,6 +237,9 @@ typedef struct _sctp_connection u8 next_avail_sub_conn; /**< Represent the index of the next free slot in sub_conn */ + u8 forming_association_changed; /**< This is a flag indicating whether the original association has been modified during + the life-span of the association itself. For instance, a new sub-connection might have been added. */ + } sctp_connection_t; typedef void (sctp_timer_expiration_handler) (u32 conn_index, u32 timer_id); @@ -280,6 +283,16 @@ void sctp_init_mss (sctp_connection_t * sctp_conn); void sctp_prepare_initack_chunk (sctp_connection_t * sctp_conn, u8 idx, vlib_buffer_t * b, ip4_address_t * ip4_addr, ip6_address_t * ip6_addr); +void +sctp_prepare_initack_chunk_for_collision (sctp_connection_t * sctp_conn, + u8 idx, vlib_buffer_t * b, + ip4_address_t * ip4_addr, + ip6_address_t * ip6_addr); +void sctp_prepare_abort_for_collision (sctp_connection_t * sctp_conn, u8 idx, + vlib_buffer_t * b, + ip4_address_t * ip4_addr, + ip6_address_t * ip6_addr); + void sctp_prepare_cookie_echo_chunk (sctp_connection_t * sctp_conn, u8 idx, vlib_buffer_t * b, sctp_state_cookie_param_t * sc); -- cgit 1.2.3-korg