From 36572f85fc0164019689aad6b24e9dccbf6a09ba Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sun, 27 Jan 2019 21:33:25 +0900 Subject: server: fix ListPolicyAssignmet() with empty name if the name isn't specified, the assignment of the global and route server clients. Non route server client doesn't have the assignment. Signed-off-by: FUJITA Tomonori --- pkg/server/server.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkg/server') diff --git a/pkg/server/server.go b/pkg/server/server.go index 3a7ab371..cd78f3fb 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -3258,8 +3258,10 @@ func (s *BgpServer) ListPolicyAssignment(ctx context.Context, r *api.ListPolicyA names := make([]string, 0, len(s.neighborMap)+1) if r.Name == "" { names = append(names, table.GLOBAL_RIB_NAME) - for name := range s.neighborMap { - names = append(names, name) + for name, peer := range s.neighborMap { + if peer.isRouteServerClient() { + names = append(names, name) + } } } else { names = append(names, r.Name) -- cgit v1.2.3