From 9da6ef79257b9cfb53f78f1f02f002aeca44200c Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Wed, 16 Jan 2019 16:47:07 +0000 Subject: [PATCH] msg/async: msgr2: keep authorizer bufferlist across reconnects Signed-off-by: Ricardo Dias --- src/msg/async/ProtocolV2.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 3492427210b..736e9d43ed9 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -2074,8 +2074,12 @@ CtPtr ProtocolV2::send_auth_request(std::vector &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); } -- 2.39.5