summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorNasato Goto <goto@mfeed.ad.jp>2019-03-22 18:52:08 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-03-24 21:17:59 +0900
commitc86c924bb3e93bda7dbdfa3d338de0fa47f8cbf6 (patch)
treefc88ac76c04079e8040c511583a03a97d54c22a1 /cmd
parentc6aef93ef141b7eba7d682bf3e52cc82b41b926b (diff)
cmd/gobgp: fix RPKI result in neighbor policy command
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gobgp/policy.go13
1 files changed, 1 insertions, 12 deletions
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))