summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-04-15 23:42:44 +0300
committerEd Tanous <ed.tanous@intel.com>2019-04-17 19:13:25 +0300
commit816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5 (patch)
tree341534fed9a2de460ded7f8231ca1cbb178bb2ca /meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net
parenta75bff085ba9443315222231c42692745e5781e9 (diff)
downloadopenbmc-816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5.tar.xz
Update 4-15-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/00010-Change-Authentication-Parameter.patch40
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0007-Adding-support-for-GetSessionInfo-command.patch101
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0008-Sync-GetSession-Info-cmd-based-on-Upstream-review.patch42
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch2
5 files changed, 109 insertions, 78 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/00010-Change-Authentication-Parameter.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/00010-Change-Authentication-Parameter.patch
new file mode 100644
index 000000000..867b3aba6
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/00010-Change-Authentication-Parameter.patch
@@ -0,0 +1,40 @@
+From 0fd38eb0a155cb11ff5a5452087f68c46d12111b Mon Sep 17 00:00:00 2001
+From: Cheng C Yang <cheng.c.yang@intel.com>
+Date: Thu, 28 Mar 2019 18:10:40 +0800
+Subject: [PATCH] Change Authentication Parameter
+
+Seprate D-bus interface Authentication to forceAuthentication,
+forceEncryption, Privilege according to the related change in
+sol-dbus-interface.
+
+Tested By:
+ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0x03
+ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0xc2
+The parameters has been changed to the request data in above command.
+
+Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
+---
+ sol/sol_manager.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/sol/sol_manager.cpp b/sol/sol_manager.cpp
+index de36723..0bd837e 100644
+--- a/sol/sol_manager.cpp
++++ b/sol/sol_manager.cpp
+@@ -195,8 +195,12 @@ void Manager::updateSOLParameter()
+
+ enable = std::get<bool>(properties["Enable"]);
+
++ forceEncrypt = std::get<bool>(properties["ForceEncryption"]);
++
++ forceAuth = std::get<bool>(properties["ForceAuthentication"]);
++
+ solMinPrivilege = static_cast<session::Privilege>(
+- std::get<uint8_t>(properties["Authentication"]));
++ std::get<uint8_t>(properties["Privilege"]));
+
+ accumulateInterval =
+ std::get<uint8_t>((properties["AccumulateIntervalMS"])) *
+--
+2.16.2
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch
index 7225c7529..0ad625a1f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch
@@ -24,7 +24,7 @@ Index: phosphor-net-ipmid.clean/command/guid.cpp
-static constexpr auto guidObjPath = "/org/openbmc/control/chassis0";
+static constexpr auto guidObjPath =
-+ "/xyz/openbmc_project/Chassis/Control/Chassis0";
++ "/xyz/openbmc_project/Chassis/Control/Chassis0";
static constexpr auto propInterface = "org.freedesktop.DBus.Properties";
Guid getSystemGUID()
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0007-Adding-support-for-GetSessionInfo-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0007-Adding-support-for-GetSessionInfo-command.patch
index fda7ed2ca..bbbe6ae4f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0007-Adding-support-for-GetSessionInfo-command.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0007-Adding-support-for-GetSessionInfo-command.patch
@@ -1,7 +1,7 @@
-From f5c7d30be4a097998d9390614c0faa2d77109ca5 Mon Sep 17 00:00:00 2001
+From b05fb3231810865ef1b6e627bb0452ae7a6c61f8 Mon Sep 17 00:00:00 2001
From: ssekar <suryakanth.sekar@linux.intel.com>
Date: Wed, 12 Dec 2018 16:04:15 +0530
-Subject: [PATCH] Adding support for GetSessionInfo command
+Subject: [PATCH 1/2] Adding support for GetSessionInfo command
Description: user can get all session info (remote ip,port,
session id, priv, etc) using this command.
@@ -20,14 +20,13 @@ Signed-off-by: ssekar <suryakanth.sekar@linux.intel.com>
message_handler.cpp | 1 +
sessions_manager.cpp | 55 +++++++++++++++
sessions_manager.hpp | 7 ++
- socket_channel.cpp | 27 ++++++-
- socket_channel.hpp | 3 +-
- 8 files changed, 301 insertions(+), 2 deletions(-)
+ socket_channel.hpp | 17 +++++
+ 7 files changed, 290 insertions(+)
-Index: phosphor-net-ipmid.clean/comm_module.cpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/comm_module.cpp
-+++ phosphor-net-ipmid.clean/comm_module.cpp
+diff --git a/comm_module.cpp b/comm_module.cpp
+index acc9089..7a1a17d 100644
+--- a/comm_module.cpp
++++ b/comm_module.cpp
@@ -53,6 +53,14 @@ void sessionSetupCommands()
&closeSession,
session::Privilege::CALLBACK,
@@ -43,20 +42,14 @@ Index: phosphor-net-ipmid.clean/comm_module.cpp
};
for (auto& iter : commands)
-Index: phosphor-net-ipmid.clean/command/session_cmds.cpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/command/session_cmds.cpp
-+++ phosphor-net-ipmid.clean/command/session_cmds.cpp
-@@ -5,11 +5,19 @@
-
- #include <host-ipmid/ipmid-api.h>
-
-+#include <iostream>
- #include <user_channel/channel_layer.hpp>
- #include <user_channel/user_layer.hpp>
-
+diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
+index 8606ce5..4beeb6e 100644
+--- a/command/session_cmds.cpp
++++ b/command/session_cmds.cpp
+@@ -8,6 +8,14 @@
namespace command
{
+
+// Defined as per IPMI sepcification
+static constexpr uint8_t searchCurrentSession = 0x00;
+static constexpr uint8_t searchSessionByHandle = 0xFE;
@@ -64,10 +57,11 @@ Index: phosphor-net-ipmid.clean/command/session_cmds.cpp
+
+static constexpr uint8_t ipmi15VerSession = 0x00;
+static constexpr uint8_t ipmi20VerSession = 0x01;
-
++
std::vector<uint8_t>
setSessionPrivilegeLevel(const std::vector<uint8_t>& inPayload,
-@@ -110,4 +118,143 @@ std::vector<uint8_t> closeSession(const
+ const message::Handler& handler)
+@@ -92,4 +100,143 @@ std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
return outPayload;
}
@@ -211,10 +205,10 @@ Index: phosphor-net-ipmid.clean/command/session_cmds.cpp
+}
+
} // namespace command
-Index: phosphor-net-ipmid.clean/command/session_cmds.hpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/command/session_cmds.hpp
-+++ phosphor-net-ipmid.clean/command/session_cmds.hpp
+diff --git a/command/session_cmds.hpp b/command/session_cmds.hpp
+index 9737fdb..741de23 100644
+--- a/command/session_cmds.hpp
++++ b/command/session_cmds.hpp
@@ -116,4 +116,59 @@ struct CloseSessionResponse
std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
const message::Handler& handler);
@@ -275,22 +269,22 @@ Index: phosphor-net-ipmid.clean/command/session_cmds.hpp
+ const message::Handler& handler);
+
} // namespace command
-Index: phosphor-net-ipmid.clean/message_handler.cpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/message_handler.cpp
-+++ phosphor-net-ipmid.clean/message_handler.cpp
-@@ -43,6 +43,7 @@ std::shared_ptr<Message> Handler::receiv
- sessionID = message->bmcSessionID;
- message->rcSessionID = session->getRCSessionID();
+diff --git a/message_handler.cpp b/message_handler.cpp
+index e2aafb3..b335236 100644
+--- a/message_handler.cpp
++++ b/message_handler.cpp
+@@ -43,6 +43,7 @@ bool Handler::receive()
+ sessionID = inMessage->bmcSessionID;
+ inMessage->rcSessionID = session->getRCSessionID();
session->updateLastTransactionTime();
+ session->channelPtr = channel;
- return message;
+ return true;
}
-Index: phosphor-net-ipmid.clean/sessions_manager.cpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/sessions_manager.cpp
-+++ phosphor-net-ipmid.clean/sessions_manager.cpp
+diff --git a/sessions_manager.cpp b/sessions_manager.cpp
+index 95a8a15..9f3210b 100644
+--- a/sessions_manager.cpp
++++ b/sessions_manager.cpp
@@ -88,6 +88,9 @@ std::shared_ptr<Session>
}
sessionID = session->getBMCSessionID();
@@ -301,7 +295,7 @@ Index: phosphor-net-ipmid.clean/sessions_manager.cpp
return session;
}
-@@ -149,12 +152,15 @@ std::shared_ptr<Session> Manager::getSes
+@@ -149,12 +152,15 @@ std::shared_ptr<Session> Manager::getSession(SessionID sessionID,
void Manager::cleanStaleEntries()
{
@@ -371,10 +365,10 @@ Index: phosphor-net-ipmid.clean/sessions_manager.cpp
+ return count;
+}
} // namespace session
-Index: phosphor-net-ipmid.clean/sessions_manager.hpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/sessions_manager.hpp
-+++ phosphor-net-ipmid.clean/sessions_manager.hpp
+diff --git a/sessions_manager.hpp b/sessions_manager.hpp
+index 9fd38b1..f6ed1c3 100644
+--- a/sessions_manager.hpp
++++ b/sessions_manager.hpp
@@ -82,8 +82,15 @@ class Manager
std::shared_ptr<Session>
getSession(SessionID sessionID,
@@ -391,14 +385,15 @@ Index: phosphor-net-ipmid.clean/sessions_manager.hpp
/**
* @brief Session Manager keeps the session objects as a sorted
* associative container with Session ID as the unique key
-Index: phosphor-net-ipmid.clean/socket_channel.hpp
-===================================================================
---- phosphor-net-ipmid.clean.orig/socket_channel.hpp
-+++ phosphor-net-ipmid.clean/socket_channel.hpp
-@@ -65,6 +65,23 @@ class Channel
+diff --git a/socket_channel.hpp b/socket_channel.hpp
+index ebe0c8f..349701e 100644
+--- a/socket_channel.hpp
++++ b/socket_channel.hpp
+@@ -64,6 +64,23 @@ class Channel
+ return endpoint.port();
}
- /**
++ /**
+ * @brief Return the binary representation of the remote IPv4 address
+ *
+ * getSessionInfo needs to return the remote IPv4 addresses of each session
@@ -415,7 +410,9 @@ Index: phosphor-net-ipmid.clean/socket_channel.hpp
+ return 0;
+ }
+
-+ /**
+ /**
* @brief Read the incoming packet
*
- * Reads the data available on the socket
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0008-Sync-GetSession-Info-cmd-based-on-Upstream-review.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0008-Sync-GetSession-Info-cmd-based-on-Upstream-review.patch
index 1a109a571..6212c0724 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0008-Sync-GetSession-Info-cmd-based-on-Upstream-review.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0008-Sync-GetSession-Info-cmd-based-on-Upstream-review.patch
@@ -1,16 +1,16 @@
-From 0ecc7c816ad4836f8f54922ba92cb527f5978d5a Mon Sep 17 00:00:00 2001
+From a413e390563205476656a9005ca447f5b626872f Mon Sep 17 00:00:00 2001
From: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Date: Wed, 6 Mar 2019 10:35:56 +0530
-Subject: [PATCH] Sync GetSession Info cmd based on Upstream review
+Subject: [PATCH 2/2] Sync GetSession Info cmd based on Upstream review
Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
---
- comm_module.cpp | 12 ++++----
- command/session_cmds.cpp | 72 +++++++++++++++++++++---------------------------
- sessions_manager.cpp | 10 +++----
+ comm_module.cpp | 12 +++----
+ command/session_cmds.cpp | 71 ++++++++++++++++++----------------------
+ sessions_manager.cpp | 10 +++---
sessions_manager.hpp | 2 +-
- socket_channel.hpp | 33 +++++++++++-----------
- 5 files changed, 59 insertions(+), 70 deletions(-)
+ socket_channel.hpp | 33 ++++++++++---------
+ 5 files changed, 59 insertions(+), 69 deletions(-)
diff --git a/comm_module.cpp b/comm_module.cpp
index 7a1a17d..2546583 100644
@@ -36,25 +36,19 @@ index 7a1a17d..2546583 100644
for (auto& iter : commands)
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
-index 7563b18..fc996a4 100644
+index 4beeb6e..0c3a4ed 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
-@@ -5,13 +5,12 @@
-
- #include <ipmid/api.h>
-
--#include <iostream>
- #include <user_channel/channel_layer.hpp>
- #include <user_channel/user_layer.hpp>
-
+@@ -8,7 +8,7 @@
namespace command
{
+
-// Defined as per IPMI sepcification
+// Defined as per IPMI specification
static constexpr uint8_t searchCurrentSession = 0x00;
static constexpr uint8_t searchSessionByHandle = 0xFE;
static constexpr uint8_t searchSessionByID = 0xFF;
-@@ -129,20 +128,6 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -111,20 +111,6 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
reinterpret_cast<GetSessionInfoResponse*>(outPayload.data());
uint32_t reqSessionID = handler.sessionID;
response->completionCode = IPMI_CC_OK;
@@ -75,7 +69,7 @@ index 7563b18..fc996a4 100644
// Here we look for session info according to session index parameter
switch (request->sessionIndex)
-@@ -150,29 +135,22 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -132,29 +118,22 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
// Look for current active session which this cmd is received over
case searchCurrentSession:
// Request data should only contain session index byte
@@ -110,7 +104,7 @@ index 7563b18..fc996a4 100644
}
// Retrieve session id based on session handle
-@@ -186,7 +164,7 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -168,7 +147,7 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
{
response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST;
outPayload.resize(sizeof(response->completionCode));
@@ -119,7 +113,7 @@ index 7563b18..fc996a4 100644
}
break;
case searchSessionByID:
-@@ -196,23 +174,38 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -178,23 +157,38 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
{
response->completionCode = IPMI_CC_REQ_DATA_LEN_INVALID;
outPayload.resize(sizeof(response->completionCode));
@@ -162,7 +156,7 @@ index 7563b18..fc996a4 100644
response->sessionHandle = 0;
if (reqSessionID != 0)
{
-@@ -225,9 +218,9 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -207,9 +201,9 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
}
catch (std::exception& e)
{
@@ -174,7 +168,7 @@ index 7563b18..fc996a4 100644
}
response->sessionHandle = std::get<session::Manager&>(singletonPool)
.getSessionHandle(reqSessionID);
-@@ -236,25 +229,24 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
+@@ -218,25 +212,24 @@ std::vector<uint8_t> getSessionInfo(const std::vector<uint8_t>& inPayload,
{
response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
outPayload.resize(sizeof(response->completionCode));
@@ -246,7 +240,7 @@ index 9f3210b..c6897c6 100644
uint8_t count = 0;
for (const auto& it : sessionsMap)
diff --git a/sessions_manager.hpp b/sessions_manager.hpp
-index c4caad4..3a3825d 100644
+index f6ed1c3..3ff213e 100644
--- a/sessions_manager.hpp
+++ b/sessions_manager.hpp
@@ -82,7 +82,7 @@ class Manager
@@ -314,5 +308,5 @@ index 349701e..8b64740 100644
/**
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch
index 771120120..c90cccf34 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch
@@ -147,7 +147,7 @@ index 2046fe4..de36723 100644
#include <boost/asio/write.hpp>
#include <chrono>
#include <cmath>
-+#include <phosphor-ipmi-host/utils.hpp>
++#include <ipmid/utils.hpp>
#include <phosphor-logging/log.hpp>
+#include <sdbusplus/message/types.hpp>
+