]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Server: handle_client_session - evict client on unknown msg
authordparmar18 <dparmar@redhat.com>
Thu, 25 Aug 2022 06:19:10 +0000 (11:49 +0530)
committerdparmar18 <dparmar@redhat.com>
Mon, 26 Sep 2022 11:59:12 +0000 (17:29 +0530)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit acae9b47bbc7eaefce3be82d8ff48a2522758d77)

src/mds/Server.cc

index 89d3199564cd765661dd1bb973fa1e1487b22907..2d370191299bc00333b24921b3fa15e4be4eb231 100644 (file)
@@ -779,7 +779,11 @@ void Server::handle_client_session(const cref_t<MClientSession> &m)
     break;
 
   default:
-    ceph_abort();
+    auto m = make_message<MClientSession>(CEPH_SESSION_REJECT);
+    mds->send_message_client(m, session);
+    derr << "Server received unknown message " << m->get_type() << ", closing session and blocklisting the client " << session->get_client() << dendl;
+    CachedStackStringStream css;
+    mds->evict_client(session->get_client().v, false, true, *css, nullptr);
   }
 }