mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Add 'smtp_excessive_pending_cmds' weird
This commit is contained in:
parent
1f7e112879
commit
d66a589558
1 changed files with 10 additions and 0 deletions
|
@ -381,7 +381,17 @@ void SMTP_Analyzer::NewCmd(const int cmd_code)
|
||||||
if ( first_cmd < 0 )
|
if ( first_cmd < 0 )
|
||||||
first_cmd = cmd_code;
|
first_cmd = cmd_code;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
auto constexpr max_pending_cmd_q_size = 1000;
|
||||||
|
|
||||||
|
if ( pending_cmd_q.size() == max_pending_cmd_q_size )
|
||||||
|
{
|
||||||
|
Weird("smtp_excessive_pending_cmds");
|
||||||
|
pending_cmd_q.clear();
|
||||||
|
}
|
||||||
|
|
||||||
pending_cmd_q.push_back(cmd_code);
|
pending_cmd_q.push_back(cmd_code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
first_cmd = cmd_code;
|
first_cmd = cmd_code;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue