From f56d740d98c9217b19e8105389d640e8433c9df4 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Sat, 29 Nov 2014 17:26:48 +0100 Subject: [PATCH] ID: 307 - Intel I82751 super pass through mode fixup The patch adds missing check for the Intel i82751 MAC being in the super pass-through mode, which has known deviations in RMCP+ from the IPMI specification. --- src/plugins/lanplus/lanplus.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c index 0bff5b2..4809333 100644 --- a/src/plugins/lanplus/lanplus.c +++ b/src/plugins/lanplus/lanplus.c @@ -3049,9 +3049,18 @@ ipmi_lanplus_rakp1(struct ipmi_intf * intf) } memcpy(msg + 28, session->username, msg[27]); - v2_payload.payload_type = IPMI_PAYLOAD_TYPE_RAKP_1; - v2_payload.payload_length = - IPMI_RAKP1_MESSAGE_SIZE - (16 - msg[27]); + v2_payload.payload_type = IPMI_PAYLOAD_TYPE_RAKP_1; + if (ipmi_oem_active(intf, "i82571spt")) { + /* + * The IPMI v2.0 spec hints on that all user name bytes + * must be occupied (29:44). The Intel 82571 GbE refuses + * to establish a session if this field is shorter. + */ + v2_payload.payload_length = IPMI_RAKP1_MESSAGE_SIZE; + } else { + v2_payload.payload_length = + IPMI_RAKP1_MESSAGE_SIZE - (16 - msg[27]); + } v2_payload.payload.rakp_1_message.message = msg; rsp = ipmi_lanplus_send_payload(intf, &v2_payload); @@ -3417,8 +3426,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf) goto fail; } - if (!ipmi_oem_active(intf, "i82571spt") && ! auth_cap.v20_data_available) - { + if (!ipmi_oem_active(intf, "i82571spt") && ! auth_cap.v20_data_available) { lprintf(LOG_INFO, "This BMC does not support IPMI v2 / RMCP+"); goto fail; }