summaryrefslogtreecommitdiff
path: root/lib/lanplus/lanplus_crypt.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-09-17 10:48:23 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-09-17 10:48:23 +0200
commit12f0c28c2c2a1785278df0d0731ef57921c0cd1a (patch)
treee0f40e53ff7ee84973790fb4b388ededa536dbe8 /lib/lanplus/lanplus_crypt.c
parentb3f027c605992040981c81d34ccc02a9f1976c07 (diff)
parent1759fac62c33877a7ebc52a423d6f99ddc9d08c4 (diff)
Merge branch 'release/debian/3.1.7-1' into masterdebian/3.1.7-1
Diffstat (limited to 'lib/lanplus/lanplus_crypt.c')
-rw-r--r--lib/lanplus/lanplus_crypt.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/lanplus/lanplus_crypt.c b/lib/lanplus/lanplus_crypt.c
index 5554898..8becfea 100644
--- a/lib/lanplus/lanplus_crypt.c
+++ b/lib/lanplus/lanplus_crypt.c
@@ -155,6 +155,14 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
/* ROLEm */
buffer[56] = session->v2_data.requested_role;
+ if (ipmi_oem_active(intf, "i82571spt")) {
+ /* The HMAC calculation code in the Intel 82571 GbE
+ * skips this bit! Looks like a GbE bug, but we need
+ * to work around it here anyway... */
+ buffer[56] &= ~0x10;
+ if (verbose > 2) printf("bitmask for i82571spt\n");
+ }
+
/* ULENGTHm */
buffer[57] = (uint8_t)strlen((const char *)session->username);
@@ -164,7 +172,9 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
if (verbose > 2)
{
- lprintf(LOG_DEBUG,"rakp2 mac input buffer (%d bytes)", bufferLength);
+ // lprintf(LOG_DEBUG,"rakp2 mac input buffer (%d bytes)", bufferLength);
+ printbuf((const uint8_t *)buffer, bufferLength, ">> rakp2 mac input buffer");
+ printbuf((const uint8_t *)session->authcode, IPMI_AUTHCODE_BUFFER_SIZE, ">> rakp2 mac key");
}
/*
@@ -179,7 +189,7 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
&macLength);
free(buffer);
-
+ buffer = NULL;
if (verbose > 2)
{