From 6c77629c345480f6f16da35563214e6f58e58878 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 26 Oct 2009 16:44:17 -0700 Subject: [PATCH] auth: fix mon crashing when filtering paxos messages --- src/mon/Monitor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 50a99a88a8877..00eaf662b8491 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -512,11 +512,13 @@ bool Monitor::ms_dispatch(Message *m) #define ALLOW_CAPS(service_id, allow_caps) \ do { \ + if (connection && connection->get_peer_type() & CEPH_ENTITY_TYPE_MON) \ + break; \ if (s && ((int)s->caps.get_caps(service_id) & (allow_caps)) != (allow_caps)) { \ dout(0) << "filtered out request due to caps " \ << " allowing=" << #allow_caps << " message=" << *m << dendl; \ delete m; \ - break; \ + goto out; \ } \ } while (0) @@ -635,6 +637,7 @@ do { \ ret = false; } } +out: if (s) { s->put(); } -- 2.39.5