[Fix] skip when country code not found in GeoIP.dat

This commit is contained in:
admin
2022-03-21 12:23:21 +08:00
parent 5b7f46bc97
commit d9d8507c8f
2 changed files with 14 additions and 5 deletions

View File

@ -85,6 +85,9 @@ func parseRule(tp, payload, target string, params []string) (C.Rule, error) {
default:
parseErr = fmt.Errorf("unsupported rule type %s", tp)
}
if parseErr != nil {
return nil, parseErr
}
ruleExtra := &C.RuleExtra{
Network: RC.FindNetwork(params),
SourceIPs: RC.FindSourceIPs(params),