StreamSplitter(c2s), wizard_processed_bytes(0)
{
wizard = w;
- w->add_ref();
// Used only in case of TCP traffic
w->reset(wand, c2s, MagicBook::ArcaneType::TCP);
}
MagicSplitter::~MagicSplitter()
{
- wizard->rem_ref();
-
// release trackers
for ( unsigned i = 0; i < wand.curse_tracker.size(); i++ )
delete wand.curse_tracker[i].tracker;
update_perf_base_state(TcpStreamTracker::TCP_CLOSED);
+ set_splitter(true, nullptr);
+ set_splitter(false, nullptr);
+
if ( restart )
{
flow->restart(free_flow_data);
server.reassembler.clear_paf();
}
- set_splitter(true, nullptr);
- set_splitter(false, nullptr);
-
tel.log_internal_event(SESSION_EVENT_CLEAR);
}
void TcpSession::init_tcp_packet_analysis(TcpSegmentDescriptor& tsd)
{
- if ( !splitter_init and tsd.is_data_segment() )
+ if ( !splitter_init and tsd.is_data_segment() and
+ (tcp_init or is_midstream_allowed(tsd)) )
{
if ( !(tcp_config->flags & STREAM_CONFIG_NO_REASSEMBLY) )
{