summaryrefslogtreecommitdiff
path: root/src/mongo/db/traffic_reader.cpp
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-05-04 09:03:54 -0400
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2019-05-14 19:23:10 -0400
commitc83e50d7275adf2a5e946ba2c4b0861fcd9dc69b (patch)
tree2f672def64169a68c2017a460896aae6ce67c2e5 /src/mongo/db/traffic_reader.cpp
parent089dd83af48cf198916e2dca50742378d4c3d361 (diff)
downloadmongo-c83e50d7275adf2a5e946ba2c4b0861fcd9dc69b.tar.gz
SERVER-28679 Set OP_MSG checksum
Diffstat (limited to 'src/mongo/db/traffic_reader.cpp')
-rw-r--r--src/mongo/db/traffic_reader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/traffic_reader.cpp b/src/mongo/db/traffic_reader.cpp
index 7ce7ddcb112..18fa2baf7dd 100644
--- a/src/mongo/db/traffic_reader.cpp
+++ b/src/mongo/db/traffic_reader.cpp
@@ -192,7 +192,8 @@ void addOpType(TrafficReaderPacket& packet, BSONObjBuilder* builder) {
if (packet.message.getNetworkOp() == dbMsg) {
Message message;
message.setData(dbMsg, packet.message.data(), packet.message.dataLen());
-
+ // Some header fields like requestId are missing, so the checksum won't match.
+ OpMsg::removeChecksum(&message);
auto opMsg = rpc::opMsgRequestFromAnyProtocol(message);
builder->append("opType", opMsg.getCommandName());
} else {