diff options
-rw-r--r-- | pkg/server/server.go | 4 |
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) } |