summaryrefslogtreecommitdiffhomepage
path: root/server/grpc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r--server/grpc_server.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index 79a3dc4d..19a2ba28 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -68,6 +68,9 @@ const (
const GRPC_PORT = 8080
func convertAf2Rf(af *api.AddressFamily) (bgp.RouteFamily, error) {
+ if af == nil {
+ return bgp.RouteFamily(0), fmt.Errorf("address family is nil")
+ }
if af.Equal(api.AF_IPV4_UC) {
return bgp.RF_IPv4_UC, nil
} else if af.Equal(api.AF_IPV6_UC) {