mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
server: fix a bug in handleGrpcGetPolicyAssignment()
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
9675b047b1
commit
e6b4e0f4ed
+3
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user