]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
message/MMonMap: reencode MonMap for old (non-addr2) clients
authorSage Weil <sage@redhat.com>
Fri, 2 Sep 2016 18:32:01 +0000 (14:32 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 20:40:12 +0000 (16:40 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MMonMap.h

index 808a7572d9caf54ff842bb14be842221d0e51499..63c8480fa4a4325b3707d27dcb94053a86d076d5 100644 (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);