diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2020-06-26 22:57:06 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-06-28 12:32:49 +0200 |
commit | baff20a14bb322fc11bf13495bb8f5d5f4626116 (patch) | |
tree | 011765b2ce4eb0a59f3ce1ec2eca42622a7e6613 /src/msg/async/ProtocolV2.cc | |
parent | msg/async/ProtocolV2: always print server_cookie in hex (diff) | |
download | ceph-baff20a14bb322fc11bf13495bb8f5d5f4626116.tar.xz ceph-baff20a14bb322fc11bf13495bb8f5d5f4626116.zip |
msg/async/ProtocolV2: take care of features when replacing the socket
reuse_connection() can be called on exproto in BANNER_CONNECTING
(i.e. without peer_supported_features and with tx/rx_frame_asm set to
msgr2.0), but this state isn't carried over. If the donor connection
is msgr2.1, this leads to repeated connection faults on crc or auth tag
mismatches because we end up assembling 2.0 frames while the peer is
expecting 2.1 frames.
Fixes: https://tracker.ceph.com/issues/46180
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'src/msg/async/ProtocolV2.cc')
-rw-r--r-- | src/msg/async/ProtocolV2.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index b7d4cacb151..603a9a526e5 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -2645,6 +2645,10 @@ CtPtr ProtocolV2::reuse_connection(const AsyncConnectionRef& existing, exproto->pre_auth.enabled = false; if (!reconnecting) { + exproto->peer_supported_features = peer_supported_features; + exproto->tx_frame_asm.set_is_rev1(tx_frame_asm.get_is_rev1()); + exproto->rx_frame_asm.set_is_rev1(rx_frame_asm.get_is_rev1()); + exproto->client_cookie = client_cookie; exproto->peer_name = peer_name; exproto->connection_features = connection_features; |