summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Eduardo Luís <joao.luis@inktank.com>2013-10-07 04:31:36 -0700
committerJoão Eduardo Luís <joao.luis@inktank.com>2013-10-07 04:31:36 -0700
commit02da1a1d79d97570f682ab84b289cdff0bc800d4 (patch)
tree466424189ef32c5a9fff4a8c18834456f92494f3
parent92a60a05841397aa0c59a1097e133eaca27ca532 (diff)
parent71ee6d7c8d3973361fa66f5e9eb4863cbc11c8a8 (diff)
downloadceph-02da1a1d79d97570f682ab84b289cdff0bc800d4.tar.gz
Merge pull request #695 from ceph/wip-mon-auth
fix mon double-free when dropping unhandled messages, and allow "get monmap" messages to go through without authenticating for MonCliente::get_monmap_privately() Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/mon/Monitor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 3fe658d9623..d8c90bc3d76 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -2583,10 +2583,10 @@ bool Monitor::_ms_dispatch(Message *m)
// and considering that we are creating a new session it is safe to
// assume that the sender hasn't authenticated yet, so we have no way
// of assessing whether we should handle it or not.
- if (!src_is_mon && m->get_type() != CEPH_MSG_AUTH) {
+ if (!src_is_mon && (m->get_type() != CEPH_MSG_AUTH &&
+ m->get_type() != CEPH_MSG_MON_GET_MAP)) {
dout(1) << __func__ << " dropping stray message " << *m
<< " from " << m->get_source_inst() << dendl;
- m->put();
return false;
}