feature: add 'quiet' option to avoid automatic update of LRU list by find session
This commit is contained in:
@@ -652,7 +652,7 @@ static void session_manager_evicte_session(struct session_manager *mgr, struct s
|
||||
|
||||
static struct session *session_manager_lookup_tcp_session(struct session_manager *mgr, const struct packet *pkt, const struct tuple6 *key)
|
||||
{
|
||||
struct session *sess = session_table_find_tuple6(mgr->tcp_sess_table, key);
|
||||
struct session *sess = session_table_find_tuple6(mgr->tcp_sess_table, key, 0);
|
||||
if (sess == NULL)
|
||||
{
|
||||
return NULL;
|
||||
@@ -1028,7 +1028,7 @@ void session_manager_free_session(struct session_manager *mgr, struct session *s
|
||||
{
|
||||
case SESSION_TYPE_TCP:
|
||||
tcp_clean(mgr, sess);
|
||||
if (session_table_find_sessid(mgr->tcp_sess_table, session_get_id(sess)) == sess)
|
||||
if (session_table_find_sessid(mgr->tcp_sess_table, session_get_id(sess), 0) == sess)
|
||||
{
|
||||
session_table_del(mgr->tcp_sess_table, sess);
|
||||
}
|
||||
@@ -1036,7 +1036,7 @@ void session_manager_free_session(struct session_manager *mgr, struct session *s
|
||||
mgr->stat.curr_nr_tcp_sess_used--;
|
||||
break;
|
||||
case SESSION_TYPE_UDP:
|
||||
if (session_table_find_sessid(mgr->udp_sess_table, session_get_id(sess)) == sess)
|
||||
if (session_table_find_sessid(mgr->udp_sess_table, session_get_id(sess), 0) == sess)
|
||||
{
|
||||
session_table_del(mgr->udp_sess_table, sess);
|
||||
}
|
||||
@@ -1077,7 +1077,7 @@ struct session *session_manager_lookup_session(struct session_manager *mgr, cons
|
||||
switch (key.ip_proto)
|
||||
{
|
||||
case IPPROTO_UDP:
|
||||
return session_table_find_tuple6(mgr->udp_sess_table, &key);
|
||||
return session_table_find_tuple6(mgr->udp_sess_table, &key, 0);
|
||||
case IPPROTO_TCP:
|
||||
return session_manager_lookup_tcp_session(mgr, pkt, &key);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user