Skip to content

Commit

Permalink
cmd/gobgp: Fix deprecated grpc.WithInsecure
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
  • Loading branch information
mrueg committed Mar 14, 2022
1 parent 8a8ce22 commit f1e6eb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/gobgp/common.go
Expand Up @@ -28,6 +28,7 @@ import (

"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"

api "github.com/osrg/gobgp/v3/api"
"github.com/osrg/gobgp/v3/pkg/packet/bgp"
Expand Down Expand Up @@ -205,7 +206,7 @@ func newClient(ctx context.Context) (api.GobgpApiClient, context.CancelFunc, err
}
grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(creds))
} else {
grpcOpts = append(grpcOpts, grpc.WithInsecure())
grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

target := globalOpts.Target
Expand Down

0 comments on commit f1e6eb0

Please sign in to comment.