summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/grpc_server.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go
index 78a53d0b..6445c003 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -1230,9 +1230,10 @@ func toStatementApi(s *config.Statement) *Statement {
cs.RpkiResult = int32(s.Conditions.BgpConditions.RpkiValidationResult.ToInt())
as := &Actions{
RouteAction: func() RouteAction {
- if s.Actions.RouteDisposition.AcceptRoute {
+ switch s.Actions.RouteDisposition {
+ case config.ROUTE_DISPOSITION_ACCEPT_ROUTE:
return RouteAction_ACCEPT
- } else if s.Actions.RouteDisposition.RejectRoute {
+ case config.ROUTE_DISPOSITION_REJECT_ROUTE:
return RouteAction_REJECT
}
return RouteAction_NONE