1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 12:44:25 +01:00

Refactored code related to stream/flow initialization. (#170)

- Removed client_flow().process_packet() in Stream constructor, in favor of processing on SYN in stream follower.
- Moved +1 to seq on SYN/ACK.
This commit is contained in:
Patrick Michel
2016-09-28 16:30:16 +02:00
committed by Matias Fontanini
parent e82b72e931
commit 838a4a5cb9
4 changed files with 35 additions and 39 deletions

View File

@@ -62,8 +62,6 @@ Stream::Stream(PDU& packet, const timestamp_type& ts)
: client_flow_(extract_client_flow(packet)),
server_flow_(extract_server_flow(packet)), create_time_(ts),
last_seen_(ts), auto_cleanup_client_(true), auto_cleanup_server_(true) {
// Update client flow state
client_flow().process_packet(packet);
const EthernetII* eth = packet.find_pdu<EthernetII>();
if (eth) {
client_hw_addr_ = eth->src_addr();