diff --git a/rule/parser.go b/rule/parser.go index a14fe16b1..05595c103 100644 --- a/rule/parser.go +++ b/rule/parser.go @@ -39,10 +39,6 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) { parsed, parseErr = RC.NewProcess(payload, target, true) case "PROCESS-PATH": parsed, parseErr = RC.NewProcess(payload, target, false) - case "MATCH": - parsed = RC.NewMatch(target) - case "RULE-SET": - parsed, parseErr = RP.NewRuleSet(payload, target) case "NETWORK": parsed, parseErr = RC.NewNetworkType(payload, target) case "UID": @@ -53,6 +49,10 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) { parsed, parseErr = logic.NewOR(payload, target) case "NOT": parsed, parseErr = logic.NewNOT(payload, target) + case "RULE-SET": + parsed, parseErr = RP.NewRuleSet(payload, target) + case "MATCH": + parsed = RC.NewMatch(target) default: parseErr = fmt.Errorf("unsupported rule type %s", tp) } diff --git a/rule/provider/parse.go b/rule/provider/parse.go index 4dc81f906..c520b53fa 100644 --- a/rule/provider/parse.go +++ b/rule/provider/parse.go @@ -82,6 +82,8 @@ func parseRule(tp, payload, target string, params []string) (C.Rule, error) { parsed, parseErr = RC.NewProcess(payload, target, true) case "PROCESS-PATH": parsed, parseErr = RC.NewProcess(payload, target, false) + case "NETWORK": + parsed, parseErr = RC.NewNetworkType(payload, target) default: parseErr = fmt.Errorf("unsupported rule type %s", tp) }