From c86c924bb3e93bda7dbdfa3d338de0fa47f8cbf6 Mon Sep 17 00:00:00 2001 From: Nasato Goto Date: Fri, 22 Mar 2019 18:52:08 +0900 Subject: cmd/gobgp: fix RPKI result in neighbor policy command --- cmd/gobgp/policy.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'cmd') diff --git a/cmd/gobgp/policy.go b/cmd/gobgp/policy.go index 0feddda9..6408248f 100644 --- a/cmd/gobgp/policy.go +++ b/cmd/gobgp/policy.go @@ -511,18 +511,7 @@ func printStatement(indent int, s *api.Statement) { fmt.Printf("%sAsPathLength: %s\n", ind, prettyString(c.AsPathLength)) } if c.RpkiResult != -1 { - var result string - switch c.RpkiResult { - case 0: - result = "none" - case 1: - result = "valid" - case 2: - result = "invalid" - case 3: - result = "not-found" - } - fmt.Printf("%sRPKI result: %s\n", ind, result) + fmt.Printf("%sRPKI result: %s\n", ind, strings.TrimPrefix(api.Validation_State(c.RpkiResult).String(), "STATE_")) } if c.RouteType != api.Conditions_ROUTE_TYPE_NONE { fmt.Printf("%sRoute Type: %s\n", ind, routeTypePrettyString(c.RouteType)) -- cgit v1.2.3