File: 0001-grpc-1.32-compat.patch

package info (click to toggle)
gobgp 3.35.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,888 kB
  • sloc: python: 11,732; sh: 3,653; makefile: 90; cpp: 70
file content (29 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Shengjing Zhu <zhsj@debian.org>
Date: Thu, 22 Dec 2022 23:59:52 +0800
Subject: grpc 1.32 compat

---
 cmd/gobgp/common.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmd/gobgp/common.go b/cmd/gobgp/common.go
index 4d9b311..f5cd8c5 100644
--- a/cmd/gobgp/common.go
+++ b/cmd/gobgp/common.go
@@ -33,7 +33,6 @@ 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"
@@ -303,7 +302,7 @@ func newClient(ctx context.Context) (api.GobgpApiClient, context.CancelFunc, err
 		creds = credentials.NewTLS(tlsConfig)
 		grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(creds))
 	} else {
-		grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
+		grpcOpts = append(grpcOpts, grpc.WithInsecure())
 	}
 
 	target := globalOpts.Target