summaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.c
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-02-26 14:52:25 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-26 22:27:50 +0000
commiteacf3cfdaf04395c07830b046037f46ae94b06ab (patch)
tree79dc7b072cdb27596ca9748b7556c36cd0e47ebe /src/vnet/sctp/sctp.c
parent2ae03d2f8f8336454edb34187e222544c1452014 (diff)
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 <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.c')
-rw-r--r--src/vnet/sctp/sctp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c
index 9a0f47b599f..046eb18dcc2 100644
--- a/src/vnet/sctp/sctp.c
+++ b/src/vnet/sctp/sctp.c
@@ -291,6 +291,8 @@ sctp_sub_connection_add_ip4 (u8 thread_index,
clib_memcpy (&sctp_conn->
sub_conn[sctp_conn->next_avail_sub_conn].connection.lcl_ip.ip4,
&ipv4_addr->address, sizeof (ipv4_addr->address));
+
+ sctp_conn->forming_association_changed = 1;
}
void
@@ -302,6 +304,8 @@ sctp_sub_connection_add_ip6 (u8 thread_index,
clib_memcpy (&sctp_conn->
sub_conn[sctp_conn->next_avail_sub_conn].connection.lcl_ip.ip6,
&ipv6_addr->address, sizeof (ipv6_addr->address));
+
+ sctp_conn->forming_association_changed = 1;
}
sctp_connection_t *