summaryrefslogtreecommitdiffhomepage
path: root/utils
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-13 11:13:48 +0300
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2021-10-15 06:47:46 +0900
commita40bc53502bbc6646c85842c07e2c6288e3b27ae (patch)
treed2e6da3b1c851ca4d474feaf07778ee780222de8 /utils
parent8072c4488fef126a403f004d2c7d45dabf3597f4 (diff)
server: Do not crash the server if an empty request over gRPC
goroutine 11 [running]: github.com/osrg/gobgp/pkg/server.newNeighborFromAPIStruct(0x0, 0xb5dd20, 0xc0000b3aa0, 0xc0002d4048) /home/donatas/projects/gobgp/pkg/server/grpc_server.go:643 +0x57 github.com/osrg/gobgp/pkg/server.(*BgpServer).AddPeer.func1(0x4a38c9, 0xb40bc0) /home/donatas/projects/gobgp/pkg/server/server.go:2940 +0x36 github.com/osrg/gobgp/pkg/server.(*BgpServer).handleMGMTOp(0xc0000f3680, 0xc0004e4348) /home/donatas/projects/gobgp/pkg/server/server.go:240 +0x47 github.com/osrg/gobgp/pkg/server.(*BgpServer).Serve(0xc0000f3680) /home/donatas/projects/gobgp/pkg/server/server.go:422 +0x735 created by main.main /home/donatas/projects/gobgp/cmd/gobgpd/main.go:153 +0x3cf To replicate: from __future__ import absolute_import from __future__ import print_function import grpc from google.protobuf.any_pb2 import Any import gobgp_pb2 import gobgp_pb2_grpc import attribute_pb2 _TIMEOUT_SECONDS = 1000 def run(): channel = grpc.insecure_channel('localhost:50051') stub = gobgp_pb2_grpc.GobgpApiStub(channel) peers = stub.AddPeer( gobgp_pb2.AddPeerRequest( ), _TIMEOUT_SECONDS, ) for peer in peers: print(peer) if __name__ == '__main__': run() Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'utils')
0 files changed, 0 insertions, 0 deletions