summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-05-06 01:31:17 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-05-14 21:54:34 +0300
commiteda2c7c523d858d25fe25052254a7f393767310b (patch)
tree7c14ec3de42b7fc6c86bc3b0f9ecb4b9f21a5d14 /meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
parent794d26fa53ad7e8cb54a3a5773436b1d8e813f35 (diff)
downloadopenbmc-eda2c7c523d858d25fe25052254a7f393767310b.tar.xz
Update to internal 0.53
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch47
1 files changed, 24 insertions, 23 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
index ac7d7f8a7..05e26bedb 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
@@ -1,7 +1,7 @@
-From 8a127e2054683479d3999ad99ba7ff76c193aa1a Mon Sep 17 00:00:00 2001
+From 5dfcd6c81a9f26c6c9c867a7a49f5259c3512be2 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
-Date: Wed, 5 Sep 2018 14:16:54 +0530
-Subject: [PATCH] Adding channel specific privilege to network
+Date: Thu, 2 Apr 2020 17:06:07 +0530
+Subject: [PATCH 1/2] Adding channel specific privilege to network
- Adding the channel access information to the network
interface object. This privilege will be used in
@@ -18,35 +18,36 @@ Change-Id: I3b592a19363eef684e31d5f7c34dad8f2f9211df
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
---
- ethernet_interface.cpp | 122 +++++++++++++++++++++++++++++++++++++++++
- ethernet_interface.hpp | 39 +++++++++++++-
- network_manager.cpp | 104 ++++++++++++++++++++++++++++++++++++
+ ethernet_interface.cpp | 123 +++++++++++++++++++++++++++++++++++++++++++++++++
+ ethernet_interface.hpp | 39 +++++++++++++++-
+ network_manager.cpp | 104 +++++++++++++++++++++++++++++++++++++++++
network_manager.hpp | 9 ++++
- 4 files changed, 267 insertions(+), 1 deletion(-)
+ 4 files changed, 274 insertions(+), 1 deletion(-)
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
-index 2375482..c3edd4b 100644
+index ed1e1ba..fca86bd 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
-@@ -37,6 +37,9 @@ using namespace phosphor::logging;
+@@ -37,6 +37,10 @@ using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
using Argument = xyz::openbmc_project::Common::InvalidArgument;
+static constexpr const char* networkChannelCfgFile =
+ "/var/channel_intf_data.json";
+static constexpr const char* defaultChannelPriv = "priv-admin";
- EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
- const std::string& objPath,
- bool dhcpEnabled, Manager& parent,
-@@ -56,6 +59,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
-
- EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo));
++
+ struct EthernetIntfSocket
+ {
+ EthernetIntfSocket(int domain, int type, int protocol)
+@@ -86,6 +90,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
EthernetInterfaceIntf::speed(std::get<0>(ifInfo));
+ EthernetInterfaceIntf::linkUp(std::get<3>(ifInfo));
+ #endif
+ getChannelPrivilege(intfName);
// Emit deferred signal.
if (emitSignal)
-@@ -823,5 +827,123 @@ void EthernetInterface::deleteAll()
+@@ -869,5 +874,123 @@ void EthernetInterface::deleteAll()
manager.writeToConfigurationFile();
}
@@ -171,7 +172,7 @@ index 2375482..c3edd4b 100644
} // namespace network
} // namespace phosphor
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
-index 60c56e3..3e4cf12 100644
+index 68668d6..058d328 100644
--- a/ethernet_interface.hpp
+++ b/ethernet_interface.hpp
@@ -2,11 +2,14 @@
@@ -215,7 +216,7 @@ index 60c56e3..3e4cf12 100644
namespace fs = std::experimental::filesystem;
class Manager; // forward declaration of network manager.
-@@ -195,6 +204,14 @@ class EthernetInterface : public Ifaces
+@@ -199,6 +208,14 @@ class EthernetInterface : public Ifaces
*/
void deleteAll();
@@ -229,8 +230,8 @@ index 60c56e3..3e4cf12 100644
+ using ChannelAccessIntf::maxPrivilege;
using EthernetInterfaceIntf::dHCPEnabled;
using EthernetInterfaceIntf::interfaceName;
- using MacAddressIntf::mACAddress;
-@@ -291,6 +308,26 @@ class EthernetInterface : public Ifaces
+ using EthernetInterfaceIntf::linkUp;
+@@ -296,6 +313,26 @@ class EthernetInterface : public Ifaces
std::string objPath;
friend class TestEthernetInterface;
@@ -380,7 +381,7 @@ index 043d7a2..75f4e5f 100644
bool Manager::createDefaultNetworkFiles(bool force)
diff --git a/network_manager.hpp b/network_manager.hpp
-index edb341f..e16b205 100644
+index edb341f..5fb9fe8 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -137,6 +137,12 @@ class Manager : public details::VLANCreateIface
@@ -396,7 +397,7 @@ index edb341f..e16b205 100644
protected:
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus& bus;
-@@ -159,6 +162,9 @@ class Manager : public details::VLANCreateIface
+@@ -159,6 +165,9 @@ class Manager : public details::VLANCreateIface
/** @brief Network Configuration directory. */
fs::path confDir;
@@ -407,5 +408,5 @@ index edb341f..e16b205 100644
} // namespace network
--
-2.21.0
+2.7.4