From: Ricardo Dias Date: Mon, 14 Jan 2019 11:53:02 +0000 (+0000) Subject: msg/async: msgr2: do not force updating rotating keys inline X-Git-Tag: v14.1.0~271^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e1b431bc0858b61cb8c0a308c60366d3fb7b3521;p=ceph.git msg/async: msgr2: do not force updating rotating keys inline Msgr2 version of PR #25859 Signed-off-by: Ricardo Dias --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 0b6f7189617..4bfe17b984d 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -407,7 +407,6 @@ ProtocolV2::ProtocolV2(AsyncConnection *connection) state(NONE), peer_required_features(0), authorizer(nullptr), - got_bad_auth(false), got_bad_method(0), auth_flags(0), cookie(0), @@ -433,7 +432,6 @@ ProtocolV2::~ProtocolV2() { void ProtocolV2::connect() { state = START_CONNECT; - got_bad_auth = false; got_bad_method = 0; if (authorizer) { delete authorizer; @@ -557,7 +555,6 @@ void ProtocolV2::reset_recv_state() { delete authorizer; } authorizer = nullptr; - got_bad_auth = false; got_bad_method = 0; } @@ -2099,31 +2096,7 @@ CtPtr ProtocolV2::handle_auth_bad_auth(char *payload, uint32_t length) { << " error code=" << bad_auth.error_code() << " error message=" << bad_auth.error_msg() << dendl; - if (got_bad_auth) { - ldout(cct, 1) << __func__ << " too many attempts, closing connection" - << dendl; - return _fault(); - } - - got_bad_auth = true; - delete authorizer; - authorizer = messenger->ms_deliver_get_authorizer(connection->peer_type, - true); // try harder - - if (!authorizer) { - ldout(cct, 1) << __func__ - << " could not get an authorizer, closing connection" - << dendl; - return _fault(); - } - - ldout(cct, 10) << __func__ << " sending auth request method=" << auth_method - << " len=" << authorizer->bl.length() << dendl; - - AuthRequestFrame authFrame(auth_method, authorizer->bl.length(), - authorizer->bl); - bufferlist &bl = authFrame.get_buffer(); - return WRITE(bl, "auth request", read_frame); + return _fault(); } CtPtr ProtocolV2::handle_auth_done(char *payload, uint32_t length) { diff --git a/src/msg/async/ProtocolV2.h b/src/msg/async/ProtocolV2.h index c45b429d959..f289b95fcb7 100644 --- a/src/msg/async/ProtocolV2.h +++ b/src/msg/async/ProtocolV2.h @@ -75,7 +75,6 @@ private: uint64_t peer_required_features; AuthAuthorizer *authorizer; uint32_t auth_method; - bool got_bad_auth; uint32_t got_bad_method; CryptoKey session_key; CryptoKey connection_secret;