session table can search session by tuple6 or tuple4 or id

This commit is contained in:
luwenpeng
2024-04-24 11:39:15 +08:00
parent 74f0504d3d
commit 476c5bac56
5 changed files with 233 additions and 105 deletions

View File

@@ -953,9 +953,9 @@ struct session *session_manager_lookup_session(struct session_manager *mgr, cons
switch (key.ip_proto)
{
case IPPROTO_UDP:
return session_table_find_tuple(mgr->udp_sess_table, &key);
return session_table_find_tuple6(mgr->udp_sess_table, &key);
case IPPROTO_TCP:
return session_table_find_tuple(mgr->tcp_sess_table, &key);
return session_table_find_tuple6(mgr->tcp_sess_table, &key);
default:
return NULL;
}