diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -413,11 +413,16 @@ recv->msg.netfn = IPMI_REPLY_ADDR(kreq->ir_ipmb_addr) >> 2; recv->msg.cmd = kreq->ir_ipmb_command; - /* Get the compcode of response */ - kreq->ir_compcode = kreq->ir_reply[6]; - /* Move the reply head past response header */ - kreq->ir_reply += 7; - len = kreq->ir_replylen - 7; + if (kreq->ir_compcode == IPMI_GET_MSG_DATA_NA) { + /* No response data */ + len = 1; + } else { + /* Get the compcode of response */ + kreq->ir_compcode = kreq->ir_reply[6]; + /* Move the reply head past response header */ + kreq->ir_reply += 7; + len = kreq->ir_replylen - 7; + } } else { addr.channel = IPMI_BMC_CHANNEL; recv->msg.netfn = IPMI_REPLY_ADDR(kreq->ir_addr) >> 2; diff --git a/sys/sys/ipmi.h b/sys/sys/ipmi.h --- a/sys/sys/ipmi.h +++ b/sys/sys/ipmi.h @@ -85,6 +85,7 @@ # define IPMI_MSG_BUFFER_FULL 0x02 # define IPMI_WDT_PRE_TIMEOUT 0x08 #define IPMI_GET_MSG 0x33 +# define IPMI_GET_MSG_DATA_NA 0x80 #define IPMI_SEND_MSG 0x34 #define IPMI_GET_CHANNEL_INFO 0x42 #define IPMI_RESET_WDOG 0x22