]> 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>
Thu, 25 Aug 2022 06:20:32 +0000 (11:50 +0530)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/mds/Server.cc

index e8313712cdcb784553f35c8452f939d161ff1544..be3406145bd0f0fa9123b555baed2b095f816f23 100644 (file)
@@ -799,7 +799,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);
   }
 }