diff options
author | anil kumar appana <anil.kumarx.appana@intel.com> | 2019-07-04 18:07:27 +0000 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-10-28 16:09:45 +0000 |
commit | ddb1f443d1d6e76949a230847e6145b108114a40 (patch) | |
tree | 05372709482c50eeed87704b60d9dcf18dfe48f0 /user_channel | |
parent | 4cc42556be1e69f1210e3a0a0bcff49078e39ec6 (diff) | |
download | phosphor-host-ipmid-ddb1f443d1d6e76949a230847e6145b108114a40.tar.gz phosphor-host-ipmid-ddb1f443d1d6e76949a230847e6145b108114a40.zip |
channelcmds:fix set chnl access sessionless chnl
Return proper error code 0x82 for session-less channel
Tested
1.verified with ipmitool raw commands
ipmitool raw 0x06 0x40 0x00 0x40 0x04
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x40
rsp=0x82): Unknown (0x82)
ipmitool raw 0x06 0x41 0x00 0x40
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41
rsp=0x82): Unknown (0x82)
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Change-Id: I9ada001427a6c3dcaaf6de026f8831faa54c182d
Diffstat (limited to 'user_channel')
-rw-r--r-- | user_channel/channelcommands.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp index 9d3b4d2..adf19d5 100644 --- a/user_channel/channelcommands.cpp +++ b/user_channel/channelcommands.cpp @@ -26,6 +26,8 @@ using namespace phosphor::logging; namespace ipmi { +static constexpr const uint8_t ccActionNotSupportedForChannel = 0x82; + /** @brief implements the set channel access command * @ param ctx - context pointer * @ param channel - channel number @@ -59,7 +61,7 @@ RspType<> ipmiSetChannelAccess(Context::ptr ctx, uint4_t channel, if (getChannelSessionSupport(chNum) == EChannelSessSupported::none) { log<level::DEBUG>("Set channel access - No support on channel"); - return responseInvalidFieldRequest(); + return response(ccActionNotSupportedForChannel); } ChannelAccess chActData; @@ -188,7 +190,7 @@ ipmi ::RspType<uint3_t, // access mode, if (getChannelSessionSupport(chNum) == EChannelSessSupported::none) { log<level::DEBUG>("Get channel access - No support on channel"); - return response(IPMI_CC_ACTION_NOT_SUPPORTED_FOR_CHANNEL); + return response(ccActionNotSupportedForChannel); } ChannelAccess chAccess; |