summaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp_output.c
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-09-27 16:43:57 +0200
committerDamjan Marion <dmarion@me.com>2018-10-01 09:41:57 +0000
commit9382673d93d94f10348d61b7e7e7375883f74f5e (patch)
tree648577d22625e3c3ea615cde980e2f9616bfbb4f /src/vnet/sctp/sctp_output.c
parent2e2372117d35191a0e6c096c5f989930de6e12b1 (diff)
SCTP: fix overflow issue with timestamp
Change-Id: I03bb47a2baa4375b7bf9347d95c4cc8de37fe510 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp_output.c')
-rw-r--r--src/vnet/sctp/sctp_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/sctp/sctp_output.c b/src/vnet/sctp/sctp_output.c
index 33063e7ef21..e69ff5c1529 100644
--- a/src/vnet/sctp/sctp_output.c
+++ b/src/vnet/sctp/sctp_output.c
@@ -779,7 +779,7 @@ sctp_prepare_initack_chunk_for_collision (sctp_connection_t * sctp_conn,
clib_host_to_net_u16 (SCTP_STATE_COOKIE_TYPE);
state_cookie_param->param_hdr.length =
clib_host_to_net_u16 (sizeof (sctp_state_cookie_param_t));
- state_cookie_param->creation_time = clib_host_to_net_u32 (sctp_time_now ());
+ state_cookie_param->creation_time = clib_host_to_net_u64 (sctp_time_now ());
state_cookie_param->cookie_lifespan =
clib_host_to_net_u32 (SCTP_VALID_COOKIE_LIFE);
@@ -919,7 +919,7 @@ sctp_prepare_initack_chunk (sctp_connection_t * sctp_conn, u8 idx,
clib_host_to_net_u16 (SCTP_STATE_COOKIE_TYPE);
state_cookie_param->param_hdr.length =
clib_host_to_net_u16 (sizeof (sctp_state_cookie_param_t));
- state_cookie_param->creation_time = clib_host_to_net_u32 (sctp_time_now ());
+ state_cookie_param->creation_time = clib_host_to_net_u64 (sctp_time_now ());
state_cookie_param->cookie_lifespan =
clib_host_to_net_u32 (SCTP_VALID_COOKIE_LIFE);
@@ -1239,7 +1239,7 @@ sctp_send_heartbeat (sctp_connection_t * sctp_conn)
vlib_main_t *vm = vlib_get_main ();
u8 i;
- u32 now = sctp_time_now ();
+ u64 now = sctp_time_now ();
for (i = 0; i < MAX_SCTP_CONNECTIONS; i++)
{