fix: Process rule is not work in classical rule-set
This commit is contained in:
parent
7a64c432b1
commit
5fa6777239
1 changed files with 13 additions and 4 deletions
|
@ -11,6 +11,7 @@ type classicalStrategy struct {
|
|||
rules []C.Rule
|
||||
count int
|
||||
shouldResolveIP bool
|
||||
shouldFindProcess bool
|
||||
parse func(tp, payload, target string, params []string) (parsed C.Rule, parseErr error)
|
||||
}
|
||||
|
||||
|
@ -32,6 +33,10 @@ func (c *classicalStrategy) ShouldResolveIP() bool {
|
|||
return c.shouldResolveIP
|
||||
}
|
||||
|
||||
func (c *classicalStrategy) ShouldFindProcess() bool {
|
||||
return c.shouldFindProcess
|
||||
}
|
||||
|
||||
func (c *classicalStrategy) OnUpdate(rules []string) {
|
||||
var classicalRules []C.Rule
|
||||
shouldResolveIP := false
|
||||
|
@ -45,6 +50,10 @@ func (c *classicalStrategy) OnUpdate(rules []string) {
|
|||
shouldResolveIP = r.ShouldResolveIP()
|
||||
}
|
||||
|
||||
if !c.shouldFindProcess {
|
||||
c.shouldFindProcess = r.ShouldFindProcess()
|
||||
}
|
||||
|
||||
classicalRules = append(classicalRules, r)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue