diff options
-rw-r--r-- | pkg/server/grpc_server.go | 2 | ||||
-rw-r--r-- | pkg/server/server.go | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go index 2540e685..725ab77a 100644 --- a/pkg/server/grpc_server.go +++ b/pkg/server/grpc_server.go @@ -360,7 +360,7 @@ func (s *server) AddPathStream(stream api.GobgpApi_AddPathStreamServer) error { pathList = append(pathList, path) } } - err = s.bgpServer.addPathList(arg.VrfId, pathList) + err = s.bgpServer.addPathStream(arg.VrfId, pathList) if err != nil { return err } diff --git a/pkg/server/server.go b/pkg/server/server.go index 16b6e869..e92155b8 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -1969,6 +1969,13 @@ func (s *BgpServer) addPathList(vrfId string, pathList []*table.Path) error { return err } +func (s *BgpServer) addPathStream(vrfId string, pathList []*table.Path) error { + err := s.mgmtOperation(func() error { + return s.addPathList(vrfId, pathList) + }, true) + return err +} + func (s *BgpServer) AddPath(ctx context.Context, r *api.AddPathRequest) (*api.AddPathResponse, error) { var uuidBytes []byte err := s.mgmtOperation(func() error { |