mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge branch 'origin/topic/bbannier/spicy-reject_protocol-during-teardown'
(cherry picked from commit 03597d210d
)
This commit is contained in:
parent
64f96e0a78
commit
3d2c69a13b
1 changed files with 6 additions and 1 deletions
|
@ -436,7 +436,12 @@ void rt::confirm_protocol() {
|
|||
void rt::reject_protocol(const std::string& reason) {
|
||||
auto _ = hilti::rt::profiler::start("zeek/rt/reject_protocol");
|
||||
auto cookie = static_cast<Cookie*>(hilti::rt::context::cookie());
|
||||
assert(cookie);
|
||||
|
||||
// We might be invoked during teardown when the cookie has already been
|
||||
// cleared. These other code paths also take care of sending an analyzer
|
||||
// violation to Zeek, so we can immediately return for such cases here.
|
||||
if ( ! cookie )
|
||||
return;
|
||||
|
||||
if ( auto x = cookie->protocol ) {
|
||||
auto tag = spicy_mgr->tagForProtocolAnalyzer(x->analyzer->GetAnalyzerTag());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue