]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async: msgr2: do not force updating rotating keys inline
authorRicardo Dias <rdias@suse.com>
Mon, 14 Jan 2019 11:53:02 +0000 (11:53 +0000)
committerRicardo Dias <rdias@suse.com>
Wed, 23 Jan 2019 13:59:27 +0000 (13:59 +0000)
Msgr2 version of PR #25859

Signed-off-by: Ricardo Dias <rdias@suse.com>
src/msg/async/ProtocolV2.cc
src/msg/async/ProtocolV2.h

index 0b6f7189617776cc33b5bdcb38885c6eb723d1f6..4bfe17b984d7a15f4e4b3ca5b9f7d7c33f76c2cd 100644 (file)
@@ -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) {
index c45b429d959dba7cd010b27d5212edbd311f415d..f289b95fcb7abac60fa73cbeb9d4cd7bb6c5923f 100644 (file)
@@ -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;