]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/ProtocolV2: reject peer_addrs of -
authorSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 15:47:54 +0000 (09:47 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 18:10:34 +0000 (12:10 -0600)
This shouldn't happen and isn't valid.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV2.cc

index 890e7bc980ad0c62fa9a37474b5b60241ac69444..8f2c5c787b8cdcf679b99bd70f12e81cbd31a5c1 100644 (file)
@@ -2518,7 +2518,8 @@ CtPtr ProtocolV2::handle_client_ident(char *payload, uint32_t length) {
                 << client_ident.supported_features()
                 << " features_required=" << client_ident.required_features()
                 << " flags=" << client_ident.flags() << std::dec << dendl;
-  if (client_ident.addrs().empty()) {
+  if (client_ident.addrs().empty() ||
+      client_ident.addrs().front() == entity_addr_t()) {
     return _fault();  // a v2 peer should never do this
   }