diff options
author | Tom Joseph <tomjoseph@in.ibm.com> | 2017-09-01 16:37:31 +0530 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-09-11 19:06:54 +0000 |
commit | 83029cb8ede836420e3c4d13e20968b661b6a2e4 (patch) | |
tree | 22a3342216ce99e74ae7aec06c60dec66c83a8ab /command/rakp12.cpp | |
parent | 7c78adf6bef735e0cf98744b3e470020456f18c1 (diff) | |
download | phosphor-net-ipmid-83029cb8ede836420e3c4d13e20968b661b6a2e4.tar.gz phosphor-net-ipmid-83029cb8ede836420e3c4d13e20968b661b6a2e4.zip |
Cache system GUID in netipmid
GUID is used in the IPMI session setup steps RAKP12 and RAKP34.
The GUID is read from the DBUS property. It is observed that
when the host is booting, reading the GUID takes a significant
delay and the session setup fails with ipmitool. Since GUID doesn't
change for a machine, it is safe to cache GUID in the netipmid and
speed up the session setup.
Resolves openbmc/openbmc#1812
Resolves openbmc/openbmc#2245
Resolves openbmc/openbmc#2246
Change-Id: I78c993b3e5ef8b6764457c8fdb3ecb985b965c0c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'command/rakp12.cpp')
-rw-r--r-- | command/rakp12.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/command/rakp12.cpp b/command/rakp12.cpp index 19dc160..e5ea3a7 100644 --- a/command/rakp12.cpp +++ b/command/rakp12.cpp @@ -113,8 +113,7 @@ std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload, std::advance(iter, cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN); // Managed System GUID - auto guid = getSystemGUID(); - std::copy_n(guid.data(), guid.size(), iter); + std::copy_n(cache::guid.data(), cache::guid.size(), iter); std::advance(iter, BMC_GUID_LEN); // Requested Privilege Level @@ -144,7 +143,9 @@ std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload, response->managed_system_random_number); // Copy System GUID to the Response - std::copy_n(guid.data(), guid.size(), response->managed_system_guid); + std::copy_n(cache::guid.data(), + cache::guid.size(), + response->managed_system_guid); // Insert the HMAC output into the payload outPayload.insert(outPayload.end(), output.begin(), output.end()); |