mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Define ordering on Rule instances and use on sets in RuleMatcher
Establishing reliable ordering fixes a test failure we're seeing on Alpine for the signatures/tcp-end-of-match btest, since discrepancies in rule match traversal could lead to discrepancies in corresponding event ordering.
This commit is contained in:
parent
42cf86b503
commit
2e03fbb8b0
3 changed files with 13 additions and 4 deletions
|
@ -59,6 +59,9 @@ public:
|
|||
|
||||
void PrintDebug();
|
||||
|
||||
bool operator==(const Rule& other) { return strcmp(ID(), other.ID()) == 0; }
|
||||
bool operator<(const Rule& other) { return strcmp(ID(), other.ID()) < 0; }
|
||||
|
||||
static const char* TypeToString(Rule::PatternType type);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue