msg/async: msgr2: send client v2 address when only v1 address is defined

Signed-off-by: Ricardo Dias <rdias@suse.com>
This commit is contained in:
Ricardo Dias 2019-01-07 13:19:33 +00:00
parent 101d75c1f2
commit 4341c1d6ee
No known key found for this signature in database
GPG Key ID: 74390C579BD37B68

View File

@ -2178,8 +2178,17 @@ CtPtr ProtocolV2::send_client_ident() {
flags |= CEPH_MSG_CONNECT_LOSSY;
}
ClientIdentFrame client_ident(this, messenger->get_myaddrs(),
messenger->get_myname().num(), global_seq,
entity_addrvec_t maddrs = messenger->get_myaddrs();
if (!messenger->get_myaddrs().front().is_msgr2()) {
entity_addr_t a = messenger->get_myaddrs().front();
a.set_type(entity_addr_t::TYPE_MSGR2);
ldout(cct, 20) << "encoding addr " << a << " instead of non-v2 myaddrs "
<< messenger->get_myaddrs() << dendl;
maddrs.v.push_back(a);
}
ClientIdentFrame client_ident(this, maddrs, messenger->get_myname().num(),
global_seq,
connection->policy.features_supported,
connection->policy.features_required, flags);