summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2019-01-27 21:33:25 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-01-27 21:33:25 +0900
commit36572f85fc0164019689aad6b24e9dccbf6a09ba (patch)
tree5350fc1af3842201e03487af2d2e2ee12a8d957c /pkg/server/server.go
parent1e133bd50141bb294dd63cd0f9f70f69c2b60422 (diff)
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 <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg/server/server.go')
-rw-r--r--pkg/server/server.go6
1 files changed, 4 insertions, 2 deletions
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)