From e214d7ac24f474f6b90a4cd513e0f51542d582fc Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Thu, 16 May 2019 10:07:52 +0200 Subject: Fix cli crash when showing neighbor stats as list. If the gRPC-server has TLS enabled, but the cli is used without TLS, it crashes when listing neighbors with a segfault due to an unhandled error. --- cmd/gobgp/neighbor.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd') diff --git a/cmd/gobgp/neighbor.go b/cmd/gobgp/neighbor.go index 9acb4f18..2a1075da 100644 --- a/cmd/gobgp/neighbor.go +++ b/cmd/gobgp/neighbor.go @@ -63,6 +63,9 @@ func getNeighbors(address string, enableAdv bool) ([]*api.Peer, error) { Address: address, EnableAdvertised: enableAdv, }) + if err != nil { + return nil, err + } l := make([]*api.Peer, 0, 1024) for { -- cgit v1.2.3