Skip endpoint check when responding to GetPDR requests
Bypassing the remote endpoint status check before responding to GetPDR
requests prevents potential issues due to the variable behavior of
remote PLDM termini. If a remote terminus sends a GetPDR request before
responding to the GetPLDMVersion command, a race condition may occur.
Therefore, it is safer to skip the remote endpoint alive check.
Change-Id: I9b2a186fee7f8d3a382b1573d872596728c9f7d4
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index 7d50b5d..1e0955a 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -162,15 +162,12 @@
Response Handler::getPDR(const pldm_msg* request, size_t payloadLength)
{
- if (hostPDRHandler)
+ if (oemPlatformHandler)
{
- if (hostPDRHandler->isHostUp() && oemPlatformHandler != nullptr)
+ auto rc = oemPlatformHandler->checkBMCState();
+ if (rc != PLDM_SUCCESS)
{
- auto rc = oemPlatformHandler->checkBMCState();
- if (rc != PLDM_SUCCESS)
- {
- return ccOnlyResponse(request, PLDM_ERROR_NOT_READY);
- }
+ return ccOnlyResponse(request, PLDM_ERROR_NOT_READY);
}
}