reactor packet I/O & duplicated packet filter & evicted session filter
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "stellar.h"
|
||||
#include "timestamp.h"
|
||||
#include "session_private.h"
|
||||
#include "session_pool.h"
|
||||
@@ -10,9 +11,8 @@
|
||||
#include "session_manager.h"
|
||||
#include "tcp_utils.h"
|
||||
#include "udp_utils.h"
|
||||
#include "packet_utils.h"
|
||||
#include "dupkt_filter.h"
|
||||
#include "eviction_filter.h"
|
||||
#include "duplicated_packet_filter.h"
|
||||
#include "evicted_session_filter.h"
|
||||
#include "id_generator.h"
|
||||
|
||||
struct session_manager
|
||||
@@ -23,8 +23,8 @@ struct session_manager
|
||||
struct session_timer *sess_timer;
|
||||
struct session_queue *sess_evicted_queue;
|
||||
|
||||
struct dupkt_filter *tcp_dupkt_filter;
|
||||
struct eviction_filter *udp_eviction_filter;
|
||||
struct duplicated_packet_filter *tcp_dup_pkt_filter;
|
||||
struct evicted_session_filter *udp_evc_sess_filter;
|
||||
|
||||
struct session_manager_options opts;
|
||||
|
||||
@@ -58,6 +58,95 @@ struct session_manager
|
||||
uint64_t npkts_hit_udp_evicted; // fast forward
|
||||
};
|
||||
|
||||
enum packet_flag
|
||||
{
|
||||
NONE = 0,
|
||||
TCP_SYN = 1 << 0,
|
||||
TCP_SYN_ACK = 1 << 1,
|
||||
TCP_FIN = 1 << 2,
|
||||
TCP_RST = 1 << 3,
|
||||
TCP_DATA = 1 << 4,
|
||||
UDP_DATA = 1 << 5,
|
||||
TIMEOUT = 1 << 6,
|
||||
};
|
||||
|
||||
struct session_finite_state_machine
|
||||
{
|
||||
int flag_mask;
|
||||
int next_state;
|
||||
} sess_fsm[SESSION_STATE_MAX][8];
|
||||
|
||||
void session_finite_state_machine_init()
|
||||
{
|
||||
// SESSION_STATE_INIT -> SESSION_STATE_OPENING
|
||||
// SESSION_STATE_INIT -> SESSION_STATE_INIT
|
||||
|
||||
sess_fsm[SESSION_STATE_INIT][0].flag_mask = TCP_SYN | TCP_SYN_ACK | UDP_DATA;
|
||||
sess_fsm[SESSION_STATE_INIT][0].next_state = SESSION_STATE_OPENING;
|
||||
|
||||
sess_fsm[SESSION_STATE_INIT][1].flag_mask = NONE;
|
||||
sess_fsm[SESSION_STATE_INIT][1].next_state = SESSION_STATE_INIT;
|
||||
|
||||
// SESSION_STATE_OPENING -> SESSION_STATE_ACTIVE
|
||||
// SESSION_STATE_OPENING -> SESSION_STATE_CLOSING
|
||||
// SESSION_STATE_OPENING -> SESSION_STATE_CLOSED
|
||||
// SESSION_STATE_OPENING -> SESSION_STATE_OPENING
|
||||
|
||||
sess_fsm[SESSION_STATE_OPENING][0].flag_mask = TCP_DATA | UDP_DATA;
|
||||
sess_fsm[SESSION_STATE_OPENING][0].next_state = SESSION_STATE_ACTIVE;
|
||||
|
||||
sess_fsm[SESSION_STATE_OPENING][1].flag_mask = TCP_FIN | TCP_RST;
|
||||
sess_fsm[SESSION_STATE_OPENING][1].next_state = SESSION_STATE_CLOSING;
|
||||
|
||||
sess_fsm[SESSION_STATE_OPENING][2].flag_mask = TIMEOUT;
|
||||
sess_fsm[SESSION_STATE_OPENING][2].next_state = SESSION_STATE_CLOSED;
|
||||
|
||||
sess_fsm[SESSION_STATE_OPENING][3].flag_mask = NONE;
|
||||
sess_fsm[SESSION_STATE_OPENING][3].next_state = SESSION_STATE_OPENING;
|
||||
|
||||
// SESSION_STATE_ACTIVE -> SESSION_STATE_CLOSING
|
||||
// SESSION_STATE_ACTIVE -> SESSION_STATE_ACTIVE
|
||||
|
||||
sess_fsm[SESSION_STATE_ACTIVE][0].flag_mask = TCP_FIN | TCP_RST | TIMEOUT;
|
||||
sess_fsm[SESSION_STATE_ACTIVE][0].next_state = SESSION_STATE_CLOSING;
|
||||
|
||||
sess_fsm[SESSION_STATE_ACTIVE][1].flag_mask = NONE;
|
||||
sess_fsm[SESSION_STATE_ACTIVE][1].next_state = SESSION_STATE_ACTIVE;
|
||||
|
||||
// SESSION_STATE_CLOSING -> SESSION_STATE_CLOSED
|
||||
// SESSION_STATE_CLOSING -> SESSION_STATE_CLOSING
|
||||
|
||||
sess_fsm[SESSION_STATE_CLOSING][0].flag_mask = TIMEOUT;
|
||||
sess_fsm[SESSION_STATE_CLOSING][0].next_state = SESSION_STATE_CLOSED;
|
||||
|
||||
sess_fsm[SESSION_STATE_CLOSING][1].flag_mask = NONE;
|
||||
sess_fsm[SESSION_STATE_CLOSING][1].next_state = SESSION_STATE_CLOSING;
|
||||
|
||||
// SESSION_STATE_CLOSED -> SESSION_STATE_INIT
|
||||
}
|
||||
|
||||
int session_finite_state_machine_run(enum session_state curr_state, int input_pkt_flag)
|
||||
{
|
||||
struct session_finite_state_machine *list = sess_fsm[curr_state];
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int mask = list[i].flag_mask;
|
||||
if (mask & input_pkt_flag)
|
||||
{
|
||||
return list[i].next_state;
|
||||
}
|
||||
|
||||
if (mask == NONE)
|
||||
{
|
||||
return list[i].next_state;
|
||||
}
|
||||
}
|
||||
|
||||
assert(0);
|
||||
|
||||
return curr_state;
|
||||
}
|
||||
|
||||
static inline void tcp_init_timeout_cb(struct session *sess, void *arg);
|
||||
static inline void tcp_handshake_timeout_cb(struct session *sess, void *arg);
|
||||
static inline void tcp_data_timeout_cb(struct session *sess, void *arg);
|
||||
@@ -66,14 +155,13 @@ static inline void tcp_time_wait_timeout_cb(struct session *sess, void *arg);
|
||||
static inline void udp_data_timeout_cb(struct session *sess, void *arg);
|
||||
|
||||
static inline int session_manager_check_options(struct session_manager_options *opts);
|
||||
static inline uint64_t session_manager_alloc_session_id(void);
|
||||
static inline int session_manager_update_tcp_filter(struct session_manager *mgr, struct session *sess, const struct packet *pkt, enum session_dir curr_dir);
|
||||
|
||||
static inline enum session_dir judge_direction_by_tuple6(const struct tuple6 *key);
|
||||
static inline enum session_dir judge_direction_by_session(const struct session *sess, const struct tuple6 *key);
|
||||
|
||||
static inline void session_update_tcp_state(struct session *sess, const struct layer_record *tcp_layer, enum session_dir curr_dir);
|
||||
static inline void session_update_udp_state(struct session *sess, const struct layer_record *udp_layer, enum session_dir curr_dir);
|
||||
static inline void session_update_tcp_state(struct session *sess, const struct layer *tcp_layer, enum session_dir curr_dir);
|
||||
static inline void session_update_udp_state(struct session *sess, const struct layer *udp_layer, enum session_dir curr_dir);
|
||||
|
||||
static inline void session_manager_update_session_state(struct session_manager *mgr, struct session *sess, enum session_state state);
|
||||
static inline void session_manager_update_session_timer(struct session_manager *mgr, struct session *sess, session_expire_cb expire_cb, uint64_t timeout_sec);
|
||||
@@ -251,52 +339,52 @@ static inline int session_manager_check_options(struct session_manager_options *
|
||||
return -1;
|
||||
}
|
||||
|
||||
// TCP duplicate packet filter opts
|
||||
if (opts->tcp_dupkt_filter_enable != 0 && opts->tcp_dupkt_filter_enable != 1)
|
||||
// duplicate packet filter opts
|
||||
if (opts->duplicated_packet_filter_enable != 0 && opts->duplicated_packet_filter_enable != 1)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid tcp dupkt filter enable, support range: 0-1");
|
||||
SESSION_LOG_ERROR("invalid duplicate packet filter enable, support range: 0-1");
|
||||
return -1;
|
||||
}
|
||||
if (opts->tcp_dupkt_filter_enable)
|
||||
if (opts->duplicated_packet_filter_enable)
|
||||
{
|
||||
if (opts->tcp_dupkt_filter_capacity == 0)
|
||||
if (opts->duplicated_packet_filter_capacity == 0)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid tcp dupkt filter capacity");
|
||||
SESSION_LOG_ERROR("invalid duplicate packet filter capacity");
|
||||
return -1;
|
||||
}
|
||||
if (opts->tcp_dupkt_filter_timeout < 1 || opts->tcp_dupkt_filter_timeout > 60)
|
||||
if (opts->duplicated_packet_filter_timeout < 1 || opts->duplicated_packet_filter_timeout > 60)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid tcp dupkt filter timeout, support range: 1-60");
|
||||
SESSION_LOG_ERROR("invalid duplicate packet filter timeout, support range: 1-60");
|
||||
return -1;
|
||||
}
|
||||
if (opts->tcp_dupkt_filter_error_rate < 0 || opts->tcp_dupkt_filter_error_rate > 1)
|
||||
if (opts->duplicated_packet_filter_error_rate < 0 || opts->duplicated_packet_filter_error_rate > 1)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid tcp dupkt filter error rate, support range: 0-1");
|
||||
SESSION_LOG_ERROR("invalid duplicate packet filter error rate, support range: 0-1");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// UDP eviction filter opts
|
||||
if (opts->udp_eviction_filter_enable != 0 && opts->udp_eviction_filter_enable != 1)
|
||||
// eviction filter opts
|
||||
if (opts->evicted_session_filter_enable != 0 && opts->evicted_session_filter_enable != 1)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid udp eviction filter enable, support range: 0-1");
|
||||
SESSION_LOG_ERROR("invalid eviction filter enable, support range: 0-1");
|
||||
return -1;
|
||||
}
|
||||
if (opts->udp_eviction_filter_enable)
|
||||
if (opts->evicted_session_filter_enable)
|
||||
{
|
||||
if (opts->udp_eviction_filter_capacity == 0)
|
||||
if (opts->evicted_session_filter_capacity == 0)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid udp eviction filter capacity");
|
||||
SESSION_LOG_ERROR("invalid eviction filter capacity");
|
||||
return -1;
|
||||
}
|
||||
if (opts->udp_eviction_filter_timeout < 1 || opts->udp_eviction_filter_timeout > 60)
|
||||
if (opts->evicted_session_filter_timeout < 1 || opts->evicted_session_filter_timeout > 60)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid udp eviction filter timeout, support range: 1-60");
|
||||
SESSION_LOG_ERROR("invalid eviction filter timeout, support range: 1-60");
|
||||
return -1;
|
||||
}
|
||||
if (opts->udp_eviction_filter_error_rate < 0 || opts->udp_eviction_filter_error_rate > 1)
|
||||
if (opts->evicted_session_filter_error_rate < 0 || opts->evicted_session_filter_error_rate > 1)
|
||||
{
|
||||
SESSION_LOG_ERROR("invalid udp eviction filter error rate, support range: 0-1");
|
||||
SESSION_LOG_ERROR("invalid eviction filter error rate, support range: 0-1");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -304,11 +392,6 @@ static inline int session_manager_check_options(struct session_manager_options *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint64_t session_manager_alloc_session_id(void)
|
||||
{
|
||||
return id_generator_get();
|
||||
}
|
||||
|
||||
// return 1: duplicate packet
|
||||
// return 0: not duplicate packet
|
||||
static inline int session_manager_update_tcp_filter(struct session_manager *mgr, struct session *sess, const struct packet *pkt, enum session_dir curr_dir)
|
||||
@@ -338,13 +421,13 @@ static inline int session_manager_update_tcp_filter(struct session_manager *mgr,
|
||||
}
|
||||
|
||||
dupkt_fitler:
|
||||
if (dupkt_filter_lookup(mgr->tcp_dupkt_filter, pkt))
|
||||
if (duplicated_packet_filter_lookup(mgr->tcp_dup_pkt_filter, pkt, timestamp_get_sec()))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupkt_filter_add(mgr->tcp_dupkt_filter, pkt);
|
||||
duplicated_packet_filter_add(mgr->tcp_dup_pkt_filter, pkt, timestamp_get_sec());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -383,7 +466,7 @@ static inline enum session_dir judge_direction_by_session(const struct session *
|
||||
}
|
||||
}
|
||||
|
||||
static inline void session_update_tcp_state(struct session *sess, const struct layer_record *tcp_layer, enum session_dir curr_dir)
|
||||
static inline void session_update_tcp_state(struct session *sess, const struct layer *tcp_layer, enum session_dir curr_dir)
|
||||
{
|
||||
const struct tcphdr *hdr = (const struct tcphdr *)tcp_layer->hdr_ptr;
|
||||
uint64_t state = session_get_tcp_state(sess);
|
||||
@@ -442,7 +525,7 @@ static inline void session_update_tcp_state(struct session *sess, const struct l
|
||||
session_set_tcp_state(sess, (enum tcp_state)state);
|
||||
}
|
||||
|
||||
static inline void session_update_udp_state(struct session *sess, const struct layer_record *udp_layer, enum session_dir curr_dir)
|
||||
static inline void session_update_udp_state(struct session *sess, const struct layer *udp_layer, enum session_dir curr_dir)
|
||||
{
|
||||
uint64_t state = session_get_udp_state(sess);
|
||||
if (curr_dir == SESSION_DIR_C2S)
|
||||
@@ -589,7 +672,6 @@ static inline void session_manager_update_session_timer(struct session_manager *
|
||||
static inline void session_manager_update_session_base(struct session_manager *mgr, struct session *sess, const struct tuple6 *key, enum session_dir curr_dir)
|
||||
{
|
||||
session_init(sess);
|
||||
session_set_id(sess, session_manager_alloc_session_id());
|
||||
session_set_key(sess, key);
|
||||
session_set_key_dir(sess, curr_dir);
|
||||
if (key->ip_proto == IPPROTO_UDP)
|
||||
@@ -643,7 +725,7 @@ static inline void session_manager_update_udp_to_closing(struct session_manager
|
||||
{
|
||||
session_manager_update_session_state(mgr, sess, SESSION_STATE_CLOSING);
|
||||
session_timer_del_session(mgr->sess_timer, sess);
|
||||
eviction_filter_add(mgr->udp_eviction_filter, session_get0_1st_pkt(sess));
|
||||
evicted_session_filter_add(mgr->udp_evc_sess_filter, session_get0_key(sess), timestamp_get_sec());
|
||||
}
|
||||
|
||||
static inline void session_manager_update_tcp_to_opening(struct session_manager *mgr, struct session *sess, int opening_by_syn)
|
||||
@@ -791,7 +873,7 @@ static inline void session_manager_handle_tcp_on_closing(struct session_manager
|
||||
|
||||
static inline struct session *session_manager_new_tcp_session(struct session_manager *mgr, const struct packet *pkt, const struct tuple6 *key)
|
||||
{
|
||||
const struct layer_record *tcp_layer = packet_get_innermost_layer(pkt, LAYER_TYPE_TCP);
|
||||
const struct layer *tcp_layer = packet_get_innermost_layer(pkt, LAYER_TYPE_TCP);
|
||||
if (tcp_layer == NULL)
|
||||
{
|
||||
mgr->npkts_miss_l4_proto++;
|
||||
@@ -805,7 +887,7 @@ static inline struct session *session_manager_new_tcp_session(struct session_man
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mgr->tcp_sess_num >= mgr->opts.max_tcp_session_num - 1)
|
||||
if (mgr->tcp_sess_num >= mgr->opts.max_tcp_session_num - RX_BURST_MAX - 1)
|
||||
{
|
||||
if (mgr->opts.tcp_overload_evict_old_sess)
|
||||
{
|
||||
@@ -828,7 +910,7 @@ static inline struct session *session_manager_new_tcp_session(struct session_man
|
||||
}
|
||||
}
|
||||
|
||||
struct session *sess = session_pool_alloc(mgr->sess_pool);
|
||||
struct session *sess = session_pool_pop(mgr->sess_pool);
|
||||
assert(sess);
|
||||
|
||||
enum session_dir curr_dir = tcp_hdr_get_ack_flag(hdr) ? SESSION_DIR_S2C : SESSION_DIR_C2S;
|
||||
@@ -843,20 +925,20 @@ static inline struct session *session_manager_new_tcp_session(struct session_man
|
||||
|
||||
session_manager_update_tcp_to_opening(mgr, sess, curr_dir == SESSION_DIR_C2S);
|
||||
session_table_add_session(mgr->tcp_sess_table, key, sess);
|
||||
dupkt_filter_add(mgr->tcp_dupkt_filter, pkt);
|
||||
duplicated_packet_filter_add(mgr->tcp_dup_pkt_filter, pkt, timestamp_get_sec());
|
||||
|
||||
return sess;
|
||||
}
|
||||
|
||||
static inline struct session *session_manager_new_udp_session(struct session_manager *mgr, const struct packet *pkt, const struct tuple6 *key)
|
||||
{
|
||||
if (eviction_filter_lookup(mgr->udp_eviction_filter, pkt))
|
||||
if (evicted_session_filter_lookup(mgr->udp_evc_sess_filter, key, timestamp_get_sec()))
|
||||
{
|
||||
mgr->npkts_hit_udp_evicted++;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mgr->udp_sess_num >= mgr->opts.max_udp_session_num - 1)
|
||||
if (mgr->udp_sess_num >= mgr->opts.max_udp_session_num - RX_BURST_MAX - 1)
|
||||
{
|
||||
if (mgr->opts.udp_overload_evict_old_sess)
|
||||
{
|
||||
@@ -879,7 +961,7 @@ static inline struct session *session_manager_new_udp_session(struct session_man
|
||||
}
|
||||
}
|
||||
|
||||
struct session *sess = session_pool_alloc(mgr->sess_pool);
|
||||
struct session *sess = session_pool_pop(mgr->sess_pool);
|
||||
assert(sess);
|
||||
|
||||
enum session_dir curr_dir = judge_direction_by_tuple6(key);
|
||||
@@ -907,7 +989,7 @@ static inline int session_manager_update_tcp_session(struct session_manager *mgr
|
||||
return -1;
|
||||
}
|
||||
|
||||
const struct layer_record *tcp_layer = packet_get_innermost_layer(pkt, LAYER_TYPE_TCP);
|
||||
const struct layer *tcp_layer = packet_get_innermost_layer(pkt, LAYER_TYPE_TCP);
|
||||
if (tcp_layer == NULL)
|
||||
{
|
||||
mgr->npkts_miss_l4_proto++;
|
||||
@@ -930,6 +1012,9 @@ static inline int session_manager_update_tcp_session(struct session_manager *mgr
|
||||
|
||||
switch (sess_state)
|
||||
{
|
||||
case SESSION_STATE_INIT:
|
||||
assert(0);
|
||||
break;
|
||||
case SESSION_STATE_OPENING:
|
||||
session_manager_handle_tcp_on_opening(mgr, sess, tcp_old_state, tcp_curr_state);
|
||||
break;
|
||||
@@ -965,6 +1050,9 @@ static inline int session_manager_update_udp_session(struct session_manager *mgr
|
||||
|
||||
switch (sess_state)
|
||||
{
|
||||
case SESSION_STATE_INIT:
|
||||
assert(0);
|
||||
break;
|
||||
case SESSION_STATE_OPENING:
|
||||
session_manager_update_udp_to_active(mgr, sess);
|
||||
break;
|
||||
@@ -977,6 +1065,8 @@ static inline int session_manager_update_udp_session(struct session_manager *mgr
|
||||
case SESSION_STATE_CLOSED:
|
||||
assert(0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -991,7 +1081,7 @@ static inline void session_manager_evicte_session(struct session_manager *mgr, s
|
||||
|
||||
if (session_get_type(sess) == SESSION_TYPE_UDP)
|
||||
{
|
||||
eviction_filter_add(mgr->udp_eviction_filter, session_get0_1st_pkt(sess));
|
||||
evicted_session_filter_add(mgr->udp_evc_sess_filter, session_get0_key(sess), timestamp_get_sec());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1013,6 +1103,19 @@ struct session_manager *session_manager_new(struct session_manager_options *opts
|
||||
}
|
||||
|
||||
memcpy(&mgr->opts, opts, sizeof(struct session_manager_options));
|
||||
struct duplicated_packet_filter_options dup_pkt_opts = {
|
||||
.enable = mgr->opts.duplicated_packet_filter_enable,
|
||||
.capacity = mgr->opts.duplicated_packet_filter_capacity,
|
||||
.timeout_sec = mgr->opts.duplicated_packet_filter_timeout,
|
||||
.error_rate = mgr->opts.duplicated_packet_filter_error_rate,
|
||||
};
|
||||
struct evicted_session_filter_options evc_sess_opts = {
|
||||
.enable = mgr->opts.evicted_session_filter_enable,
|
||||
.capacity = mgr->opts.evicted_session_filter_capacity,
|
||||
.timeout_sec = mgr->opts.evicted_session_filter_timeout,
|
||||
.error_rate = mgr->opts.evicted_session_filter_error_rate,
|
||||
};
|
||||
|
||||
mgr->sess_pool = session_pool_new(mgr->opts.max_tcp_session_num + mgr->opts.max_udp_session_num);
|
||||
if (mgr->sess_pool == NULL)
|
||||
{
|
||||
@@ -1043,14 +1146,14 @@ struct session_manager *session_manager_new(struct session_manager_options *opts
|
||||
goto error;
|
||||
}
|
||||
|
||||
mgr->tcp_dupkt_filter = dupkt_filter_new(mgr->opts.tcp_dupkt_filter_enable, mgr->opts.tcp_dupkt_filter_capacity, mgr->opts.tcp_dupkt_filter_error_rate, mgr->opts.tcp_dupkt_filter_timeout);
|
||||
if (mgr->tcp_dupkt_filter == NULL)
|
||||
mgr->tcp_dup_pkt_filter = duplicated_packet_filter_new(&dup_pkt_opts, timestamp_get_sec());
|
||||
if (mgr->tcp_dup_pkt_filter == NULL)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
|
||||
mgr->udp_eviction_filter = eviction_filter_new(mgr->opts.udp_eviction_filter_enable, mgr->opts.udp_eviction_filter_capacity, mgr->opts.udp_eviction_filter_error_rate, mgr->opts.udp_eviction_filter_timeout);
|
||||
if (mgr->udp_eviction_filter == NULL)
|
||||
mgr->udp_evc_sess_filter = evicted_session_filter_new(&evc_sess_opts, timestamp_get_sec());
|
||||
if (mgr->udp_evc_sess_filter == NULL)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
@@ -1085,8 +1188,8 @@ void session_manager_free(struct session_manager *mgr)
|
||||
session_manager_free_session(mgr, sess);
|
||||
}
|
||||
|
||||
eviction_filter_free(mgr->udp_eviction_filter);
|
||||
dupkt_filter_free(mgr->tcp_dupkt_filter);
|
||||
evicted_session_filter_free(mgr->udp_evc_sess_filter);
|
||||
duplicated_packet_filter_free(mgr->tcp_dup_pkt_filter);
|
||||
session_queue_free(mgr->sess_evicted_queue);
|
||||
session_timer_free(mgr->sess_timer);
|
||||
session_table_free(mgr->udp_sess_table);
|
||||
@@ -1173,7 +1276,7 @@ void session_manager_free_session(struct session_manager *mgr, struct session *s
|
||||
session_set0_cur_pkt(sess, NULL);
|
||||
session_set_cur_dir(sess, SESSION_DIR_NONE);
|
||||
session_free(sess);
|
||||
session_pool_free(mgr->sess_pool, sess);
|
||||
session_pool_push(mgr->sess_pool, sess);
|
||||
sess = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user