From fc3464dac99c9e3e56616e6c6bc6d10886b2f567 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Mon, 5 Aug 2024 14:58:19 -0700 Subject: session: session_lookup_local_endpoint returns the wrong value SESSION_INVALID_INDEX is u32. The function is supposed to return u64. The caller of the function tests the return value to see if it is SESSION_INVALID_HANDLE in ct_session_connect. If it is not, it thinks it is a valid handle and calls listen_session_get_from_handle which causes a crash. Type: fix Change-Id: I4ede6b2dfb95259f3a6071cfa3a77ce0d9cd9edd Signed-off-by: Steven Luong --- src/vnet/session/session_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c index 1e58e5e7806..3a461a5949f 100644 --- a/src/vnet/session/session_lookup.c +++ b/src/vnet/session/session_lookup.c @@ -595,7 +595,7 @@ session_lookup_local_endpoint (u32 table_index, session_endpoint_t * sep) st = session_table_get (table_index); if (!st) - return SESSION_INVALID_INDEX; + return SESSION_INVALID_HANDLE; ASSERT (st->is_local); if (sep->is_ip4) -- cgit