summaryrefslogtreecommitdiffstats
path: root/sensordatahandler.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-05-03 13:29:40 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-05-08 21:37:49 +0000
commitf865dea955fcec03c71c356d91ac0f574f62c4aa (patch)
treef610bdeda5ca2e6fb8ee16bcea698afd093d5503 /sensordatahandler.cpp
parentb0c794d83c6ed5ac25db7f93ba8be54c570f971b (diff)
downloadphosphor-host-ipmid-f865dea955fcec03c71c356d91ac0f574f62c4aa.tar.gz
phosphor-host-ipmid-f865dea955fcec03c71c356d91ac0f574f62c4aa.zip
Return invalid data length (0xc7) for commands not properly unpacked
The correct value for commands that unpacked but did not consume all the data was already returned (0xc7), but if all the expected data was not present, the return code was the response of the unpack command, which is not an IPMI value. This changes the unpack response to always return 0xc7 if it is too short or too long for the command. Tested-by: run ipmitool with correct and incorrect byte counts (get channel access command expects 2 bytes of data) # ipmitool raw 6 0x41 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid # ipmitool raw 6 0x41 1 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid # ipmitool raw 6 0x41 1 0x80 40 40 # ipmitool raw 6 0x41 1 0x80 1 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid Change-Id: Ic72c1f2050f7bdcdcc8a5b808d11f80fac4e9813 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'sensordatahandler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud