From 0ee03e7172c12e054ebae5169d0c9e6563478e8d Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 11 May 2026 17:24:08 +0300 Subject: [PATCH] Add reply == request opcode check (also just in case) --- src/client/msgr_receive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/msgr_receive.cpp b/src/client/msgr_receive.cpp index 88ea0d06..c7ca2160 100644 --- a/src/client/msgr_receive.cpp +++ b/src/client/msgr_receive.cpp @@ -348,7 +348,7 @@ void osd_messenger_t::handle_op_hdr(osd_client_t *cl) bool osd_messenger_t::handle_reply_hdr(osd_client_t *cl) { auto req_it = cl->sent_ops.find(cl->read_op->req.hdr.id); - if (req_it == cl->sent_ops.end()) + if (req_it == cl->sent_ops.end() || req_it->second->req.hdr.opcode != cl->read_op->req.hdr.opcode) { // Command out of sync. Drop connection fprintf(stderr, "Client %ju command out of sync: id %ju\n", cl->client_id, cl->read_op->req.hdr.id);