mirror of
https://github.com/ceph/ceph
synced 2025-04-01 14:51:13 +00:00
mon: Set MForward::client_caps explicitly; this fixes a bad connection deref.
Previously the decoded PaxosServiceMessage would attempt to follow an uninitialized Connection* and segfault the system.
This commit is contained in:
parent
213ffe2079
commit
8d9f4fa227
@ -35,6 +35,10 @@ struct MForward : public Message {
|
||||
client = m->get_source_inst();
|
||||
client_caps = m->get_session()->caps;
|
||||
}
|
||||
MForward(PaxosServiceMessage *m, MonCaps caps) :
|
||||
Message(MSG_FORWARD), msg(m), client_caps(caps) {
|
||||
client = m->get_source_inst();
|
||||
}
|
||||
|
||||
~MForward() {
|
||||
delete msg;
|
||||
|
@ -487,7 +487,7 @@ void Monitor::resend_routed_requests()
|
||||
PaxosServiceMessage *req = (PaxosServiceMessage *)decode_message(q);
|
||||
|
||||
dout(10) << " resend to mon" << mon << " tid " << rr->tid << " " << *req << dendl;
|
||||
MForward *forward = new MForward(req);
|
||||
MForward *forward = new MForward(req, rr->session->caps);
|
||||
forward->set_priority(req->get_priority());
|
||||
messenger->send_message(forward, monmap->get_inst(mon));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user