summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorChristoph Heiss <me@christoph-heiss.me>2019-05-16 10:07:52 +0200
committerChristoph Heiss <me@christoph-heiss.me>2019-05-16 10:07:52 +0200
commite214d7ac24f474f6b90a4cd513e0f51542d582fc (patch)
tree13bb856c1e4ad50a2053d69502ac7a79229ae3bb /cmd
parent1072de0a3fd821bb514d898c1b4a333a0e98c63d (diff)
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.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gobgp/neighbor.go3
1 files changed, 3 insertions, 0 deletions
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 {