Fix: unsupported rule should throw error

This commit is contained in:
gVisor bot 2019-11-04 23:07:19 +08:00
parent 726281255c
commit f9b35c7a44

View file

@ -482,6 +482,8 @@ func parseRules(cfg *rawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
// deprecated when bump to 1.0
case "FINAL":
parsed = R.NewMatch(target)
default:
parseErr = fmt.Errorf("unsupported rule type %s", rule[0])
}
if parseErr != nil {