diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-10 20:00:00 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-10 20:03:23 +0900 |
commit | 127e81dc75cce9adc9330ad45e4dc95f04a171fa (patch) | |
tree | fb3c5d2fb7639a8892c2fa325138faeb96b032b5 | |
parent | 501f5e0bef6324e2d73c6cb49224788b1baaf99d (diff) |
policy: fix NewRpkiValidationConditionFromApiStruct()
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | table/policy.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/table/policy.go b/table/policy.go index 158d359e..675c46b2 100644 --- a/table/policy.go +++ b/table/policy.go @@ -1554,10 +1554,11 @@ func (c *RpkiValidationCondition) Set() DefinedSet { } func NewRpkiValidationConditionFromApiStruct(a int32) (*RpkiValidationCondition, error) { - if a == 0 { + if a < 1 { return nil, nil } - typ := config.RpkiValidationResultType(a) + var typ config.RpkiValidationResultType + typ = typ.FromInt(int(a)) return NewRpkiValidationCondition(typ) } |