From 273968cf2d0343b2f4e3217f25c0752f20cf03c5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 3 Jan 2022 10:34:52 -0800 Subject: tcp: cast timer ticks to u32 tc->rto * TCP_TO_TIMER_TICK can return garbage if not cast to u32 and that confuses clib_max Type: fix Signed-off-by: Florin Coras signed-off-by: Vipul Agrawal Change-Id: Ief4d29b9625e2ef2e75e0c7e3d731ab147465f6d --- src/vnet/tcp/tcp_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet/tcp/tcp_output.c') diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 403ddb3b962..dfcb4ee394e 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -788,7 +788,7 @@ tcp_send_syn (tcp_connection_t * tc) * such that we can return if we've ran out. */ tcp_timer_update (&wrk->timer_wheel, tc, TCP_TIMER_RETRANSMIT_SYN, - tc->rto * TCP_TO_TIMER_TICK); + (u32) tc->rto * TCP_TO_TIMER_TICK); if (PREDICT_FALSE (!vlib_buffer_alloc (vm, &bi, 1))) { @@ -1478,7 +1478,7 @@ tcp_timer_retransmit_syn_handler (tcp_connection_t * tc) tcp_enqueue_half_open (wrk, tc, b, bi); tcp_timer_update (&wrk->timer_wheel, tc, TCP_TIMER_RETRANSMIT_SYN, - tc->rto * TCP_TO_TIMER_TICK); + (u32) tc->rto * TCP_TO_TIMER_TICK); } /** -- cgit 1.2.3-korg