From: Sage Weil Date: Sun, 5 Jan 2014 06:43:26 +0000 (-0800) Subject: mon: only send messages to current OSDs X-Git-Tag: v0.67.6~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1545ddbd3b6dfac897d483bd58a4335d68b9b62a;p=ceph.git mon: only send messages to current OSDs When choosing a random OSD to send a message to, verify not only that the OSD id is up but that the session is for the same instance of that OSD by checking that the address matches. Fixes: #7093 Backport: emperor, dumpling Signed-off-by: Sage Weil (cherry picked from commit 98ed9ac5fed6eddf68f163086df72faabd9edcde) --- diff --git a/src/mon/Session.h b/src/mon/Session.h index 7df6001581c2..a5f67d9e2dac 100644 --- a/src/mon/Session.h +++ b/src/mon/Session.h @@ -147,7 +147,8 @@ struct MonSessionMap { bool backward = true, forward = true; while (backward || forward) { if (backward) { - if (osdmap->is_up(b->first)) { + if (osdmap->is_up(b->first) && + osdmap->get_addr(b->first) == b->second->con->get_peer_addr()) { s = b->second; break; }