Skip to content

Commit fcb34b9

Browse files
committed
fix nil pointer when InsecureSkipVerify is true
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
1 parent 8d32d0f commit fcb34b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/xds/translator/translator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ func addXdsCluster(tCtx *types.ResourceVersionTable, args *xdsClusterArgs) error
10601060
preferLocal := ptr.Deref(args.loadBalancer, ir.LoadBalancer{}).PreferLocal
10611061
xdsEndpoints := buildXdsClusterLoadAssignment(args.name, args.settings, preferLocal)
10621062
for _, ds := range args.settings {
1063-
if ds.TLS != nil {
1063+
if ds.TLS != nil && !ds.TLS.InsecureSkipVerify {
10641064
// Create an SDS secret for the CA certificate - either with inline bytes or with a filesystem ref
10651065
secret := buildXdsUpstreamTLSCASecret(ds.TLS)
10661066
if err := tCtx.AddXdsResource(resourcev3.SecretType, secret); err != nil {

0 commit comments

Comments
 (0)