diff --git a/src/Conn.cc b/src/Conn.cc index 6169559e7c..e4f8b3c341 100644 --- a/src/Conn.cc +++ b/src/Conn.cc @@ -56,7 +56,6 @@ Connection::Connection(const detail::ConnKey& k, double t, vlan = pkt->vlan; inner_vlan = pkt->inner_vlan; - skip = 0; weird = 0; suppress_event = 0; @@ -155,11 +154,11 @@ void Connection::NextPacket(double t, bool is_orig, run_state::current_timestamp = t; run_state::current_pkt = pkt; - if ( Skipping() ) - return; - if ( adapter ) { + if ( adapter->Skipping() ) + return; + record_current_packet = record_packet; record_current_content = record_content; adapter->NextPacket(len, data, is_orig, -1, ip, caplen); diff --git a/src/Conn.h b/src/Conn.h index 19d5d943d3..ff7e167832 100644 --- a/src/Conn.h +++ b/src/Conn.h @@ -143,14 +143,6 @@ public: return "unknown"; } - // FIXME: Now this is in Analyzer and should eventually be removed here. - // - // If true, skip processing of remainder of connection. Note - // that this does not in itself imply that record_packets is false; - // we might want instead to process the connection off-line. - void SetSkip(bool do_skip) { skip = do_skip ? 1 : 0; } - bool Skipping() const { return skip; } - // Returns true if the packet reflects a reuse of this // connection (i.e., not a continuation but the beginning of // a new connection). @@ -270,7 +262,6 @@ private: detail::ConnKey key; - unsigned int skip:1; unsigned int weird:1; unsigned int finished:1; unsigned int saw_first_orig_packet:1, saw_first_resp_packet:1; diff --git a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc index 0b2c05fcfa..329612790d 100644 --- a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc +++ b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc @@ -90,7 +90,7 @@ bool IPBasedAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pkt run_state::current_pkt = pkt; // TODO: Does this actually mean anything? - if ( conn->Skipping() ) + if ( conn->GetSessionAdapter()->Skipping() ) return true; DeliverPacket(conn, run_state::processing_start_time, is_orig, len, pkt); diff --git a/src/zeek.bif b/src/zeek.bif index d4415777f9..ae82b82835 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -4441,7 +4441,7 @@ function skip_further_processing%(cid: conn_id%): bool if ( ! c ) return zeek::val_mgr->False(); - c->SetSkip(1); + c->GetSessionAdapter()->SetSkip(1); return zeek::val_mgr->True(); %}