diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-02 21:42:59 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-02 21:42:59 +0900 |
commit | 21e90498549fedb59dfe288e866e020bb30e58a3 (patch) | |
tree | 7ca8de448356353c72a8a68b91da55ac310465f9 /server/rpki.go | |
parent | ada1d611be510e950d42997bbfd6896d65f5c234 (diff) |
server: fix gobgp hang
gobgp asks for non existing thing (e.g. local rib for non route server
peer), gobgpd doesn't send anything so gobgp will hang up.
This fixes gobgpd to send an empty response.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/rpki.go')
-rw-r--r-- | server/rpki.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/rpki.go b/server/rpki.go index dc8a94cc..ec7c9afe 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -137,8 +137,8 @@ func (c *roaClient) handleGRPC(grpcReq *GrpcRequest) { break } + results := make([]*GrpcResponse, 0) if tree, ok := c.roas[grpcReq.RouteFamily]; ok { - results := make([]*GrpcResponse, 0) tree.Walk(func(s string, v interface{}) bool { r, _ := v.(*roa) result := &GrpcResponse{} @@ -146,8 +146,8 @@ func (c *roaClient) handleGRPC(grpcReq *GrpcRequest) { results = append(results, result) return false }) - go sendMultipleResponses(grpcReq, results) } + go sendMultipleResponses(grpcReq, results) } } |