diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-08-06 10:48:59 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-08 20:56:46 +0900 |
commit | 8084d5e51fbf9be4eb36d194f311ca769361d501 (patch) | |
tree | 3f7463f56a9f8d98cacbacc9995cb7a6c8745942 /server | |
parent | a01b549fffd428f075b8732fde244c47baf28ecd (diff) |
server: guard against nil pointer dereference
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index cb301fef..b6e8843a 100644 --- a/server/server.go +++ b/server/server.go @@ -1129,7 +1129,7 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { if err != nil { break } - if peer.fsm.adminState != ADMIN_STATE_DOWN { + if peer.isRouteServerClient() && peer.fsm.adminState != ADMIN_STATE_DOWN { remoteAddr := grpcReq.Name if t, ok := server.localRibMap[remoteAddr].rib.Tables[grpcReq.RouteFamily]; ok { for _, dst := range t.GetDestinations() { |