Check SetEFIBootOptions when Byte 1&2 are 0
Update of: ipmiOemSetEfiBootOptions()
A check is done when both arguments are 0.
This is a invalid or unuseful condition.
Tested
==========
Issue command "ipmitool raw 0x30 0xEA 0x00 0x00 " expect rtn mess:
Unable to send RAW command
(channel=0x0 netfn=0x30 lun=0x0 cmd=0xea rsp=0xcc):
Invalid data field in request
Signed-off-by: Mike Jones <michaelx.jones@intel.com>
Change-Id: Ia28cb34983baf0c28084227fd1df71e5045406cd
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 5a3cef1..12fdae7 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -3557,6 +3557,12 @@
using namespace boot_options;
auto oneTimeEnabled = false;
+ if (bootFlag == 0 && bootParam == 0)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Unsupported parameter");
+ return ipmi::response(ccParameterNotSupported);
+ }
if (bootFlag == static_cast<uint8_t>(BootOptionParameter::setInProgress))
{
if (bootOption)