aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/lb_policy
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-03-10 17:27:15 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2018-03-10 21:32:57 -0800
commitc7c0d69d8b411f1c5102bfd186aa2f6992c2e59c (patch)
tree4fda7b9d59a6c8e39b0bff4632072840d5bf4945 /src/core/ext/filters/client_channel/lb_policy
parent12136821220a671bb9d6443b69817babf2f5c254 (diff)
Secure channels: use the right authority
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy')
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index cb39e4224e..49918e11b7 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -504,9 +504,7 @@ GrpcLb::BalancerCallState::BalancerCallState(
// the polling entities from client_channel.
GPR_ASSERT(grpclb_policy()->server_name_ != nullptr);
GPR_ASSERT(grpclb_policy()->server_name_[0] != '\0');
- grpc_slice host =
- grpc_slice_from_copied_string(grpclb_policy()->server_name_);
- grpc_millis deadline =
+ const grpc_millis deadline =
grpclb_policy()->lb_call_timeout_ms_ == 0
? GRPC_MILLIS_INF_FUTURE
: ExecCtx::Get()->Now() + grpclb_policy()->lb_call_timeout_ms_;
@@ -514,8 +512,7 @@ GrpcLb::BalancerCallState::BalancerCallState(
grpclb_policy()->lb_channel_, nullptr, GRPC_PROPAGATE_DEFAULTS,
grpclb_policy_->interested_parties(),
GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD,
- &host, deadline, nullptr);
- grpc_slice_unref_internal(host);
+ nullptr, deadline, nullptr);
// Init the LB call request payload.
grpc_grpclb_request* request =
grpc_grpclb_request_create(grpclb_policy()->server_name_);
@@ -982,6 +979,10 @@ grpc_channel_args* BuildBalancerChannelArgs(
// with the one from the grpclb policy, used to propagate updates to
// the LB channel.
GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
+ // The LB channel should use the authority indicated by the target
+ // authority table (see \a grpc_lb_policy_grpclb_modify_lb_channel_args),
+ // as opposed to the authority from the parent channel.
+ GRPC_ARG_DEFAULT_AUTHORITY,
};
// Channel args to add.
const grpc_arg args_to_add[] = {