Add session_set_discard

This commit is contained in:
luwenpeng
2024-05-20 17:02:16 +08:00
parent be9a68935b
commit 3701fc7361
5 changed files with 43 additions and 18 deletions

View File

@@ -178,6 +178,10 @@ static void *work_thread(void *arg)
fast_path:
plugin_manager_on_session_egress(sess, pkt);
if (sess && session_get_current_state(sess) == SESSION_STATE_DISCARD)
{
packet_set_action(pkt, PACKET_ACTION_DROP);
}
update_session_stat(sess, pkt);
if (packet_get_action(pkt) == PACKET_ACTION_DROP)
{
@@ -218,11 +222,7 @@ static void *work_thread(void *arg)
merge_thread_stat(thread, now);
ip_reassembly_expire(ip_reass, now);
// TODO
plugin_manager_on_polling(runtime->plug_mgr);
// session_manager_cron();
// poll_non_packet_events();
if (nr_recv == 0)
{