mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Fixing removal of support analyzers, plus some tweaking and cleanup of
CONNECT code. Removal of support analyzers was broken. The code now actually doesn't delete them immediately anymore but instead just flags them as disabled. They'll be destroyed with the parent analyzer later. Also includes a new leak tests exercising the CONNECT code. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch topic/robin/http-connect # Changes to be committed: # modified: scripts/base/protocols/http/main.bro # modified: scripts/base/protocols/ssl/consts.bro # modified: src/analyzer/Analyzer.cc # modified: src/analyzer/Analyzer.h # modified: src/analyzer/protocol/http/HTTP.cc # new file: testing/btest/core/leaks/http-connect.bro # modified: testing/btest/scripts/base/protocols/http/http-connect.bro # # Untracked files: # .tags # changes.txt # conn.log # debug.log # diff # mpls-in-vlan.patch # newfile.pcap # packet_filter.log # reporter.log # src/PktSrc.cc.orig # weird.log #
This commit is contained in:
parent
dd0856a57f
commit
338d521003
7 changed files with 128 additions and 65 deletions
|
@ -587,7 +587,7 @@ protected:
|
|||
void RemoveTimer(Timer* t);
|
||||
|
||||
/**
|
||||
* Returnsn true if the analyzer has associated an SupportAnalyzer of a given type.
|
||||
* Returns true if the analyzer has associated an SupportAnalyzer of a given type.
|
||||
*
|
||||
* @param tag The type to check for.
|
||||
*
|
||||
|
@ -595,6 +595,14 @@ protected:
|
|||
*/
|
||||
bool HasSupportAnalyzer(Tag tag, bool orig);
|
||||
|
||||
/**
|
||||
* Returns the first still active support analyzer for the given
|
||||
* direction, or null if none.
|
||||
*
|
||||
* @param orig True if asking about the originator side.
|
||||
*/
|
||||
SupportAnalyzer* FirstSupportAnalyzer(bool orig);
|
||||
|
||||
/**
|
||||
* Adds a a new child analyzer with the option whether to intialize
|
||||
* it. This is an internal method.
|
||||
|
@ -616,6 +624,12 @@ protected:
|
|||
*/
|
||||
void AppendNewChildren();
|
||||
|
||||
/**
|
||||
* Returns true if the analyzer has been flagged for removal and
|
||||
* shouldn't be used otherwise anymore.
|
||||
*/
|
||||
bool Removing() const { return removing; }
|
||||
|
||||
private:
|
||||
// Internal method to eventually delete a child analyzer that's
|
||||
// already Done().
|
||||
|
@ -718,6 +732,14 @@ public:
|
|||
*/
|
||||
bool IsOrig() const { return orig; }
|
||||
|
||||
/**
|
||||
* Returns the analyzer's next sibling, or null if none.
|
||||
*
|
||||
* only_active: If true, this will skip siblings that are still link
|
||||
* but flagged for removal.
|
||||
*/
|
||||
SupportAnalyzer* Sibling(bool only_active = false) const;
|
||||
|
||||
/**
|
||||
* Passes packet input to the next sibling SupportAnalyzer if any, or
|
||||
* on to the associated main analyzer if none. If however there's an
|
||||
|
@ -749,11 +771,6 @@ public:
|
|||
*/
|
||||
virtual void ForwardUndelivered(int seq, int len, bool orig);
|
||||
|
||||
/**
|
||||
* Returns the analyzer next sibling, or null if none.
|
||||
*/
|
||||
SupportAnalyzer* Sibling() const { return sibling; }
|
||||
|
||||
protected:
|
||||
friend class Analyzer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue