diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go index 05a1f295..0642619b 100644 --- a/server/server.go +++ b/server/server.go @@ -1682,14 +1682,12 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) { } close(grpcReq.ResponseCh) case REQ_NEIGHBOR: - l := []*api.Peer{} + l := make([]*config.Neighbor, 0) for _, peer := range server.neighborMap { - l = append(l, peer.ToApiStruct()) + l = append(l, peer.ToConfig()) } grpcReq.ResponseCh <- &GrpcResponse{ - Data: &api.GetNeighborResponse{ - Peers: l, - }, + Data: l, } close(grpcReq.ResponseCh) case REQ_ADJ_RIB_IN, REQ_ADJ_RIB_OUT: |