summaryrefslogtreecommitdiff
path: root/src/mongo/executor/connection_pool_tl.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2021-09-16 11:44:59 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-16 21:09:17 +0000
commitf9383c046f2895f6622fe48f063ab3c174afcbb6 (patch)
tree0438fe51b4aa9857a0e736062dad90a44079e6be /src/mongo/executor/connection_pool_tl.cpp
parent8ea70d9b2ce06759735b99c45aef9c5a39f8a94c (diff)
downloadmongo-f9383c046f2895f6622fe48f063ab3c174afcbb6.tar.gz
SERVER-59876 Ensure hostname is progated for internal sasl auth
Diffstat (limited to 'src/mongo/executor/connection_pool_tl.cpp')
-rw-r--r--src/mongo/executor/connection_pool_tl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/executor/connection_pool_tl.cpp b/src/mongo/executor/connection_pool_tl.cpp
index 30383538b1a..547a968ed38 100644
--- a/src/mongo/executor/connection_pool_tl.cpp
+++ b/src/mongo/executor/connection_pool_tl.cpp
@@ -171,7 +171,7 @@ public:
explicit TLConnectionSetupHook(executor::NetworkConnectionHook* hookToWrap, bool x509AuthOnly)
: _wrappedHook(hookToWrap), _x509AuthOnly(x509AuthOnly) {}
- BSONObj augmentIsMasterRequest(BSONObj cmdObj) override {
+ BSONObj augmentIsMasterRequest(const HostAndPort& remoteHost, BSONObj cmdObj) override {
BSONObjBuilder bob(std::move(cmdObj));
bob.append("hangUpOnStepDown", false);
if (internalSecurity.user) {
@@ -181,7 +181,7 @@ public:
if (_x509AuthOnly) {
_speculativeAuthType = auth::SpeculativeAuthType::kAuthenticate;
} else {
- _speculativeAuthType = auth::speculateInternalAuth(&bob, &_session);
+ _speculativeAuthType = auth::speculateInternalAuth(remoteHost, &bob, &_session);
}
return bob.obj();