Print this page
NEX-9891 Unable to use ipmitopo to return IPMI data for ipmi-enabled JBODs
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
        
@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
@@ -476,12 +477,11 @@
         /* IPMI message header */
         (void) memset(&msg_hdr, 0, sizeof (msg_hdr));
         msg_hdr.imh_addr1 = IPMI_BMC_SLAVE_ADDR;
         msg_hdr.imh_lun = req->ic_lun;
         msg_hdr.imh_netfn = req->ic_netfn;
-        tmp = off - cs;
-        msg_hdr.imh_csum = ipmi_csum(msg + cs, tmp);
+        msg_hdr.imh_csum = ipmi_csum((uint8_t *)&msg_hdr, sizeof (msg_hdr));
         cs = off;
         msg_hdr.imh_addr2 = IPMI_BMC_SLAVE_ADDR;
         entry->ire_rq_seq = curr_seq++;
         msg_hdr.imh_seq = entry->ire_rq_seq << 2;
         msg_hdr.imh_cmd = req->ic_cmd;