message/MMonMap: reencode MonMap for old (non-addr2) clients

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-09-02 14:32:01 -04:00
parent 5e51cea658
commit 1893315baa

View File

@ -34,7 +34,9 @@ public:
const char *get_type_name() const { return "mon_map"; }
void encode_payload(uint64_t features) {
if (monmapbl.length() && (features & CEPH_FEATURE_MONENC) == 0) {
if (monmapbl.length() &&
((features & CEPH_FEATURE_MONENC) == 0 ||
(features & CEPH_FEATURE_MSG_ADDR2) == 0)) {
// reencode old-format monmap
MonMap t;
t.decode(monmapbl);