summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-16 07:07:06 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-16 16:31:01 +0900
commite6b4e0f4edb9d501fabbc52ffbaac013b3748aba (patch)
tree17a2c80f07609693d955d431b1a30c0e2a6a3173 /server/server.go
parent9675b047b1d0c995f2ba8f733811c3f7d94aed7f (diff)
server: fix a bug in handleGrpcGetPolicyAssignment()
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 9cfe3d56..ce18f2a2 100644
--- a/server/server.go
+++ b/server/server.go
@@ -2952,7 +2952,9 @@ func (server *BgpServer) handleGrpcGetPolicyAssignment(grpcReq *GrpcRequest) (*a
if err != nil {
return rsp, err
}
- rsp.Assignment.Default = server.policy.GetDefaultPolicy(id, dir).ToApiStruct()
+ rsp.Assignment = &api.PolicyAssignment{
+ Default: server.policy.GetDefaultPolicy(id, dir).ToApiStruct(),
+ }
ps := server.policy.GetPolicy(id, dir)
rsp.Assignment.Policies = make([]*api.Policy, 0, len(ps))
for _, x := range ps {