mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
Merge pull request #13656 from tchaikov/wip-19015
mon/MonClient: discard stray messages from non-acitve conns Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
66256aa5f7
@ -70,7 +70,8 @@ int CephxClientHandler::build_request(bufferlist& bl) const
|
||||
|
||||
::encode(req, bl);
|
||||
|
||||
ldout(cct, 10) << "get auth session key: client_challenge " << req.client_challenge << dendl;
|
||||
ldout(cct, 10) << "get auth session key: client_challenge "
|
||||
<< hex << req.client_challenge << dendl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -117,7 +118,8 @@ int CephxClientHandler::handle_response(int ret, bufferlist::iterator& indata)
|
||||
CephXServerChallenge ch;
|
||||
::decode(ch, indata);
|
||||
server_challenge = ch.server_challenge;
|
||||
ldout(cct, 10) << " got initial server challenge " << server_challenge << dendl;
|
||||
ldout(cct, 10) << " got initial server challenge "
|
||||
<< hex << server_challenge << dendl;
|
||||
starting = false;
|
||||
|
||||
tickets.invalidate_ticket(CEPH_ENTITY_TYPE_AUTH);
|
||||
|
@ -249,7 +249,9 @@ bool MonClient::ms_dispatch(Message *m)
|
||||
Mutex::Locker lock(monc_lock);
|
||||
|
||||
if (_hunting()) {
|
||||
if (!pending_cons.count(m->get_source_addr())) {
|
||||
auto pending_con = pending_cons.find(m->get_source_addr());
|
||||
if (pending_con == pending_cons.end() ||
|
||||
pending_con->second.get_con() != m->get_connection()) {
|
||||
// ignore any messages outside hunting sessions
|
||||
ldout(cct, 10) << "discarding stray monitor message " << *m << dendl;
|
||||
m->put();
|
||||
|
Loading…
Reference in New Issue
Block a user