"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/stream/tcp/tcp_stream_tracker.cc" between
snort3-3.1.29.0.tar.gz and snort3-3.1.30.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

tcp_stream_tracker.cc  (snort3-3.1.29.0):tcp_stream_tracker.cc  (snort3-3.1.30.0)
skipping to change at line 673 skipping to change at line 673
return true; return true;
} }
void TcpStreamTracker::perform_fin_recv_flush(TcpSegmentDescriptor& tsd) void TcpStreamTracker::perform_fin_recv_flush(TcpSegmentDescriptor& tsd)
{ {
if ( tsd.is_data_segment() ) if ( tsd.is_data_segment() )
session->handle_data_segment(tsd); session->handle_data_segment(tsd);
if ( flush_policy == STREAM_FLPOLICY_ON_DATA and SEQ_EQ(tsd.get_end_seq(), r cv_nxt) if ( flush_policy == STREAM_FLPOLICY_ON_DATA and SEQ_EQ(tsd.get_end_seq(), r cv_nxt)
and !tsd.get_flow()->searching_for_service() ) and !tsd.get_flow()->searching_for_service() )
reassembler.flush_queued_segments(tsd.get_flow(), true, tsd.get_pkt()); reassembler.finish_and_final_flush(tsd.get_flow(), true, tsd.get_pkt());
} }
uint32_t TcpStreamTracker::perform_partial_flush() uint32_t TcpStreamTracker::perform_partial_flush()
{ {
uint32_t flushed = 0; uint32_t flushed = 0;
if ( held_packet != null_iterator ) if ( held_packet != null_iterator )
flushed = reassembler.perform_partial_flush(session->flow); {
Packet* p;
flushed = reassembler.perform_partial_flush(session->flow, p);
// If the held_packet hasn't been released by perform_partial_flush(),
// call finalize directly.
if ( is_holding_packet() )
{
finalize_held_packet(p);
tcpStats.held_packet_purges++;
}
// call this here explicitly, because we've avoided it in reassembler
// and we need to set flow state to BLOCK, if need be
Stream::check_flow_closed(p);
}
return flushed; return flushed;
} }
bool TcpStreamTracker::is_retransmit_of_held_packet(Packet* cp) bool TcpStreamTracker::is_retransmit_of_held_packet(Packet* cp)
{ {
if ( (held_packet == null_iterator) or ( cp->daq_msg == held_packet->get_daq _msg() ) ) if ( (held_packet == null_iterator) or ( cp->daq_msg == held_packet->get_daq _msg() ) )
return false; return false;
uint32_t next_send_seq = cp->ptrs.tcph->seq() + (uint32_t)cp->dsize; uint32_t next_send_seq = cp->ptrs.tcph->seq() + (uint32_t)cp->dsize;
if ( SEQ_LEQ(cp->ptrs.tcph->seq(), held_packet->get_seq_num()) and SEQ_GT(ne xt_send_seq, held_packet->get_seq_num()) ) if ( SEQ_LEQ(cp->ptrs.tcph->seq(), held_packet->get_seq_num()) and SEQ_GT(ne xt_send_seq, held_packet->get_seq_num()) )
 End of changes. 2 change blocks. 
2 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)