diff options
author | Emiliano Ciavatta | 2020-04-26 15:41:01 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-04-26 15:41:01 +0000 |
commit | b33f14c35bb3a6d08fe095d3d20e1d40f7398500 (patch) | |
tree | fb6ee4cd9b667700f75203b9ea91c6f6bccac364 /rules_manager.go | |
parent | 8bd21ad9873690c52485e3581a8108c6f351e3a6 (diff) |
Change pcap_importer api
Diffstat (limited to 'rules_manager.go')
-rw-r--r-- | rules_manager.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rules_manager.go b/rules_manager.go index c256354..36379e6 100644 --- a/rules_manager.go +++ b/rules_manager.go @@ -19,7 +19,6 @@ type RegexFlags struct { Caseless bool `json:"caseless" bson:"caseless,omitempty"` // Set case-insensitive matching. DotAll bool `json:"dot_all" bson:"dot_all,omitempty"` // Matching a `.` will not exclude newlines. MultiLine bool `json:"multi_line" bson:"multi_line,omitempty"` // Set multi-line anchoring. - SingleMatch bool `json:"single_match" bson:"single_match,omitempty"` // Set single-match only mode. Utf8Mode bool `json:"utf_8_mode" bson:"utf_8_mode,omitempty"` // Enable UTF-8 mode for this expression. UnicodeProperty bool `json:"unicode_property" bson:"unicode_property,omitempty"` // Enable Unicode property support for this expression } @@ -339,6 +338,7 @@ func (p *Pattern) BuildPattern() (*hyperscan.Pattern, error) { return nil, err } + hp.Flags |= hyperscan.SomLeftMost if p.Flags.Caseless { hp.Flags |= hyperscan.Caseless } @@ -348,9 +348,6 @@ func (p *Pattern) BuildPattern() (*hyperscan.Pattern, error) { if p.Flags.MultiLine { hp.Flags |= hyperscan.MultiLine } - if p.Flags.SingleMatch { - hp.Flags |= hyperscan.SingleMatch - } if p.Flags.Utf8Mode { hp.Flags |= hyperscan.Utf8Mode } |