]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-mon: keep v1 address type when explicitly set 31765/head
authorRicardo Dias <rdias@suse.com>
Wed, 20 Nov 2019 10:42:18 +0000 (10:42 +0000)
committerRicardo Dias <rdias@suse.com>
Wed, 20 Nov 2019 15:11:09 +0000 (15:11 +0000)
Fixes: https://tracker.ceph.com/issues/42906
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/ceph_mon.cc

index 573453c2d671b7e6bca996fcdd6516e7b7b1cb8e..f46607ed0b25abc4a23e55016a43bf879ca5850c 100644 (file)
@@ -194,9 +194,11 @@ entity_addrvec_t make_mon_addrs(entity_addr_t a)
   } else if (a.get_port() == CEPH_MON_PORT_LEGACY) {
     a.set_type(entity_addr_t::TYPE_LEGACY);
     addrs.v.push_back(a);
-  } else {
+  } else if (a.get_type() == entity_addr_t::TYPE_ANY) {
     a.set_type(entity_addr_t::TYPE_MSGR2);
     addrs.v.push_back(a);
+  } else {
+    addrs.v.push_back(a);
   }
   return addrs;
 }