From 5ab8b3ab14849d57c7036076866584b92d398fa1 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 14 Jul 2022 09:18:33 -0700 Subject: [PATCH] Revert "Fix for ipv6 link local with scope (#9326)" This reverts commit c1abc7f8acb46a3c4500e6cf8352222422e8624f. It produced compilation issues inside Google. I strongly suspect it isn't this commit or gRPC's fault, but it prevents further testing until it is resolved. --- .../main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/okhttp/src/main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java b/okhttp/src/main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java index 0706a39d028..d09d6cccedd 100644 --- a/okhttp/src/main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java +++ b/okhttp/src/main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java @@ -19,8 +19,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.VisibleForTesting; -import com.google.common.net.HostAndPort; -import com.google.common.net.InetAddresses; import io.grpc.internal.GrpcUtil; import io.grpc.okhttp.internal.OptionalMethod; import io.grpc.okhttp.internal.Platform; @@ -249,9 +247,7 @@ protected void configureTlsExtensions( } else { SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true); } - if (SET_SERVER_NAMES != null - && SNI_HOST_NAME != null - && !InetAddresses.isInetAddress(HostAndPort.fromString(hostname).getHost())) { + if (SET_SERVER_NAMES != null && SNI_HOST_NAME != null) { SET_SERVER_NAMES .invoke(sslParams, Collections.singletonList(SNI_HOST_NAME.newInstance(hostname))); } else {