From 3487d18baecaaf808e3092bf688cf2ee50fc1662 Mon Sep 17 00:00:00 2001 From: ronenschafferibm Date: Thu, 6 Sep 2018 14:26:25 +0300 Subject: [PATCH 1/2] Retrieve the inner SNI if exists --- src/envoy/tcp/mixer/filter.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/envoy/tcp/mixer/filter.cc b/src/envoy/tcp/mixer/filter.cc index 105db9d19b6..8a39ccda987 100644 --- a/src/envoy/tcp/mixer/filter.cc +++ b/src/envoy/tcp/mixer/filter.cc @@ -159,7 +159,12 @@ bool Filter::IsMutualTLS() const { } bool Filter::GetRequestedServerName(std::string* name) const { - return Utils::GetRequestedServerName(&filter_callbacks_->connection(), name); + bool isSet = Utils::GetRequestedServerName(&filter_callbacks_->connection(), name); + if (!filter_callbacks_->networkLevelRequestedServerName().empty()) { + *name = std::string(filter_callbacks_->networkLevelRequestedServerName()); + isSet = true; + } + return isSet; } bool Filter::GetDestinationIpPort(std::string* str_ip, int* port) const { From 66a94d2eab70e0ce9321dfeaece8c2fe42bf4b84 Mon Sep 17 00:00:00 2001 From: ronenschafferibm Date: Thu, 6 Sep 2018 16:47:26 +0300 Subject: [PATCH 2/2] Use envoy's version that includes network_level_sni_reader filter --- WORKSPACE | 4 ++-- istio.deps | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 216e318664e..2b62af8b926 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -30,12 +30,12 @@ bind( ) # When updating envoy sha manually please update the sha in istio.deps file also -ENVOY_SHA = "2d8386532f68899ca1fe6476dc458b0df1260b29" +ENVOY_SHA = "349a03a250317937e18103bd49925fc9cf4ef480" http_archive( name = "envoy", strip_prefix = "envoy-" + ENVOY_SHA, - url = "https://github.com/istio/envoy/archive/" + ENVOY_SHA + ".zip", + url = "https://github.com/ronenschafferibm/envoy/archive/" + ENVOY_SHA + ".zip", ) load("@envoy//bazel:repositories.bzl", "envoy_dependencies") diff --git a/istio.deps b/istio.deps index 0aa6b58bef6..e114f03d85b 100644 --- a/istio.deps +++ b/istio.deps @@ -11,6 +11,6 @@ "name": "ENVOY_SHA", "repoName": "istio/envoy", "file": "WORKSPACE", - "lastStableSHA": "2d8386532f68899ca1fe6476dc458b0df1260b29" + "lastStableSHA": "349a03a250317937e18103bd49925fc9cf4ef480" } ] \ No newline at end of file