mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
packet_analysis: Do not run DetectProtocol() on disabled analyzers
This came up when disabling the TEREDO analyzer but still seeing its DetectProtocol() method prominently in flame graphs.
This commit is contained in:
parent
9bebd93c06
commit
ec4ad2e80d
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ const AnalyzerPtr& Analyzer::FindInnerAnalyzer(size_t len, const uint8_t* data,
|
|||
// Return an analyzer found via DetectProtocol() for the given data, else nil.
|
||||
const AnalyzerPtr& Analyzer::DetectInnerAnalyzer(size_t len, const uint8_t* data, Packet* packet) const {
|
||||
for ( const auto& child : analyzers_to_detect ) {
|
||||
if ( child->DetectProtocol(len, data, packet) ) {
|
||||
if ( child->IsEnabled() && child->DetectProtocol(len, data, packet) ) {
|
||||
DBG_LOG(DBG_PACKET_ANALYSIS, "Protocol detection in %s succeeded, next layer analyzer is %s",
|
||||
GetAnalyzerName(), child->GetAnalyzerName());
|
||||
return child;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue