Remove obsolete Skipping()/SetSkip() from Connection

This commit is contained in:
Tim Wojtulewicz 2021-05-24 16:34:58 -07:00
parent 08fb5d76ee
commit 12d768d0d8
4 changed files with 5 additions and 15 deletions

View file

@ -56,7 +56,6 @@ Connection::Connection(const detail::ConnKey& k, double t,
vlan = pkt->vlan; vlan = pkt->vlan;
inner_vlan = pkt->inner_vlan; inner_vlan = pkt->inner_vlan;
skip = 0;
weird = 0; weird = 0;
suppress_event = 0; suppress_event = 0;
@ -155,11 +154,11 @@ void Connection::NextPacket(double t, bool is_orig,
run_state::current_timestamp = t; run_state::current_timestamp = t;
run_state::current_pkt = pkt; run_state::current_pkt = pkt;
if ( Skipping() )
return;
if ( adapter ) if ( adapter )
{ {
if ( adapter->Skipping() )
return;
record_current_packet = record_packet; record_current_packet = record_packet;
record_current_content = record_content; record_current_content = record_content;
adapter->NextPacket(len, data, is_orig, -1, ip, caplen); adapter->NextPacket(len, data, is_orig, -1, ip, caplen);

View file

@ -143,14 +143,6 @@ public:
return "unknown"; 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 // Returns true if the packet reflects a reuse of this
// connection (i.e., not a continuation but the beginning of // connection (i.e., not a continuation but the beginning of
// a new connection). // a new connection).
@ -270,7 +262,6 @@ private:
detail::ConnKey key; detail::ConnKey key;
unsigned int skip:1;
unsigned int weird:1; unsigned int weird:1;
unsigned int finished:1; unsigned int finished:1;
unsigned int saw_first_orig_packet:1, saw_first_resp_packet:1; unsigned int saw_first_orig_packet:1, saw_first_resp_packet:1;

View file

@ -90,7 +90,7 @@ bool IPBasedAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pkt
run_state::current_pkt = pkt; run_state::current_pkt = pkt;
// TODO: Does this actually mean anything? // TODO: Does this actually mean anything?
if ( conn->Skipping() ) if ( conn->GetSessionAdapter()->Skipping() )
return true; return true;
DeliverPacket(conn, run_state::processing_start_time, is_orig, len, pkt); DeliverPacket(conn, run_state::processing_start_time, is_orig, len, pkt);

View file

@ -4441,7 +4441,7 @@ function skip_further_processing%(cid: conn_id%): bool
if ( ! c ) if ( ! c )
return zeek::val_mgr->False(); return zeek::val_mgr->False();
c->SetSkip(1); c->GetSessionAdapter()->SetSkip(1);
return zeek::val_mgr->True(); return zeek::val_mgr->True();
%} %}