]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/ProtocolV1: generate authorizer for mon to mon connections 27823/head
authorSage Weil <sage@redhat.com>
Fri, 26 Apr 2019 18:07:31 +0000 (13:07 -0500)
committerSage Weil <sage@redhat.com>
Fri, 26 Apr 2019 18:18:42 +0000 (13:18 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV1.cc

index 4647b3e1fe11d66f42ab973ce2f25e09b22e4f14..10c99bebd314b641e8a8c87c418f16463cf15324 100644 (file)
@@ -1444,7 +1444,8 @@ CtPtr ProtocolV1::send_connect_message()
   bufferlist auth_bl;
   vector<uint32_t> preferred_modes;
 
-  if (connection->peer_type != CEPH_ENTITY_TYPE_MON) {
+  if (connection->peer_type != CEPH_ENTITY_TYPE_MON ||
+      messenger->get_myname().type() == CEPH_ENTITY_TYPE_MON) {
     if (authorizer_more.length()) {
       ldout(cct,10) << __func__ << " using augmented (challenge) auth payload"
                    << dendl;
@@ -1575,7 +1576,8 @@ CtPtr ProtocolV1::handle_connect_reply_auth(char *buffer, int r) {
   bufferlist authorizer_reply;
   authorizer_reply.append(buffer, connect_reply.authorizer_len);
 
-  if (connection->peer_type != CEPH_ENTITY_TYPE_MON) {
+  if (connection->peer_type != CEPH_ENTITY_TYPE_MON ||
+      messenger->get_myname().type() == CEPH_ENTITY_TYPE_MON) {
     auto am = auth_meta;
     bool more = (connect_reply.tag == CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER);
     bufferlist auth_retry_bl;