Reject unallowlisted controller write-read requests
The whitelist check for the Controller Write Read command only logs a
blocked message but still proceeds with i2cWriteRead,
so unapproved I2C transactions go through.
Change-Id: Id8a62045d53cdf77bd7252aff93b3d2851fcdad6
Signed-off-by: Farheen Iqbal <iqbalfarheen@gmail.com>
diff --git a/apphandler.cpp b/apphandler.cpp
index 014355c..883b762 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -1766,6 +1766,7 @@
"bus: {BUS}, addr: {ADDR}",
"BUS", static_cast<uint8_t>(busId), "ADDR", lg2::hex,
static_cast<uint8_t>(targetAddr));
+ return ipmi::responseCommandDisabled();
}
#endif // ENABLE_I2C_WHITELIST_CHECK
std::vector<uint8_t> readBuf(readCount);