]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: msgr2: keep authorizer bufferlist across reconnects
authorRicardo Dias <rdias@suse.com>
Wed, 16 Jan 2019 16:47:07 +0000 (16:47 +0000)
committerRicardo Dias <rdias@suse.com>
Wed, 23 Jan 2019 13:59:28 +0000 (13:59 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/msg/async/ProtocolV2.cc

index 3492427210bf8f96cd41e6c7aa9d773d6d790ebc..736e9d43ed9de5584f8af1667ca8391d2f12e2d3 100644 (file)
@@ -2074,8 +2074,12 @@ CtPtr ProtocolV2::send_auth_request(std::vector<uint32_t> &allowed_methods) {
   ldout(cct, 10) << __func__ << " sending auth request method=" << auth_method
                  << " len=" << authorizer->bl.length() << dendl;
 
+  // we need to copy authorizer->bl because we might need it again in a
+  // reconnect
+  bufferlist auth_blob;
+  auth_blob.append(authorizer->bl);
   AuthRequestFrame authFrame(auth_method, authorizer->bl.length(),
-                             authorizer->bl);
+                             auth_blob);
   bufferlist &bl = authFrame.get_buffer();
   return WRITE(bl, "auth request", read_frame);
 }