fix: plugin_manager_on_packet_egress called incorrectly when IP is defragmented
This commit is contained in:
@@ -194,7 +194,6 @@ static void *work_thread(void *arg)
|
||||
* Suggestion: After modifying the system time, restart the service to ensure consistent timing.
|
||||
*/
|
||||
now_ms = stellar_get_real_time_msec();
|
||||
//memset(packets, 0, sizeof(packets));
|
||||
nr_recv = packet_io_ingress(packet_io, thr_idx, packets, RX_BURST_MAX);
|
||||
if (nr_recv == 0)
|
||||
{
|
||||
@@ -218,12 +217,10 @@ static void *work_thread(void *arg)
|
||||
else
|
||||
{
|
||||
pkt = defraged_pkt;
|
||||
plugin_manager_on_packet_ingress(plug_mgr, pkt);
|
||||
plugin_manager_on_packet_egress(plug_mgr, pkt);
|
||||
plugin_manager_on_packet_ingress(plug_mgr, defraged_pkt);
|
||||
}
|
||||
}
|
||||
|
||||
pkt = &packets[i];
|
||||
sess = session_manager_lookup_session_by_packet(sess_mgr, pkt);
|
||||
if (sess == NULL)
|
||||
{
|
||||
@@ -250,7 +247,15 @@ static void *work_thread(void *arg)
|
||||
|
||||
fast_path:
|
||||
plugin_manager_on_session_egress(sess, pkt);
|
||||
if (pkt == defraged_pkt)
|
||||
{
|
||||
plugin_manager_on_packet_egress(plug_mgr, defraged_pkt);
|
||||
plugin_manager_on_packet_egress(plug_mgr, &packets[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin_manager_on_packet_egress(plug_mgr, pkt);
|
||||
}
|
||||
|
||||
if (sess && session_get_current_state(sess) == SESSION_STATE_DISCARD)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user