From f0aaac4f644bcaeb25d05e0ff0997cb99c7b2696 Mon Sep 17 00:00:00 2001 From: Eiichiro Watanabe Date: Mon, 12 Nov 2018 22:05:01 +0900 Subject: server: Fix wrong value of RouteMonitoringPolicy from grpc --- pkg/server/server.go | 4 ++-- 1 file 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) } -- cgit v1.2.3