summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEiichiro Watanabe <a16tochjp@gmail.com>2018-11-12 22:05:01 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-11-13 07:11:27 +0900
commitf0aaac4f644bcaeb25d05e0ff0997cb99c7b2696 (patch)
tree96d0dff1539fbfe4887fbd3e05437678fbaed904
parent9cad94f3bab7c7fe0f87ab5b76a3bcf5a404c25e (diff)
server: Fix wrong value of RouteMonitoringPolicy from grpc
-rw-r--r--pkg/server/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 68a43c0e..75c39739 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -1599,14 +1599,14 @@ func (s *BgpServer) EnableZebra(ctx context.Context, r *api.EnableZebraRequest)
func (s *BgpServer) AddBmp(ctx context.Context, r *api.AddBmpRequest) error {
return s.mgmtOperation(func() error {
- t, ok := api.AddBmpRequest_MonitoringPolicy_name[int32(r.Type)]
+ _, ok := api.AddBmpRequest_MonitoringPolicy_name[int32(r.Type)]
if !ok {
return fmt.Errorf("invalid bmp route monitoring policy: %v", r.Type)
}
return s.bmpManager.addServer(&config.BmpServerConfig{
Address: r.Address,
Port: r.Port,
- RouteMonitoringPolicy: config.BmpRouteMonitoringPolicyType(t),
+ RouteMonitoringPolicy: config.IntToBmpRouteMonitoringPolicyTypeMap[int(r.Type)],
})
}, true)
}