Copy the IPMI input message details to output message
Copy the encrytion,authentication and bmc session id from the
IPMI input message to output IPMI message.
Change-Id: I16e3adaad4e0c4ce3f2a9ad48c327d5b0bb0be9b
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/message_handler.cpp b/message_handler.cpp
index bfc861e..8332517 100644
--- a/message_handler.cpp
+++ b/message_handler.cpp
@@ -35,7 +35,6 @@
std::unique_ptr<Message> message;
std::tie(message, sessionHeader) = parser::unflatten(packet);
-
auto session = (std::get<session::Manager&>(singletonPool).getSession(
message->bmcSessionID)).lock();
@@ -51,8 +50,6 @@
std::vector<uint8_t>& output, Message& inMessage)
{
auto outMessage = std::make_unique<Message>();
- outMessage->rcSessionID = inMessage.rcSessionID;
-
outMessage->payloadType = PayloadType::IPMI;
outMessage->payload.resize(sizeof(LAN::header::Response) +
@@ -137,9 +134,13 @@
break;
default:
break;
-
}
+ outMessage->isPacketEncrypted = inMessage.isPacketEncrypted;
+ outMessage->isPacketAuthenticated = inMessage.isPacketAuthenticated;
+ outMessage->rcSessionID = inMessage.rcSessionID;
+ outMessage->bmcSessionID = inMessage.bmcSessionID;
+
return outMessage;
}
diff --git a/message_handler.hpp b/message_handler.hpp
index ee8a04f..7ca7c3d 100644
--- a/message_handler.hpp
+++ b/message_handler.hpp
@@ -87,7 +87,6 @@
Message& inMessage)
{
auto outMessage = std::make_unique<Message>();
- outMessage->rcSessionID = inMessage.rcSessionID;
outMessage->payloadType = T;
outMessage->payload = output;
return outMessage;