summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch33
1 files changed, 16 insertions, 17 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch
index e4d9d2837..fe7c45532 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch
@@ -1,4 +1,4 @@
-From c139e292d43bdc9484f77ef2f75df5dc9ff14e15 Mon Sep 17 00:00:00 2001
+From f6240a81c0ed87c128d454fa9c4023b9062efe5e Mon Sep 17 00:00:00 2001
From: sunitakx <sunitax.kumari@linux.intel.com>
Date: Tue, 13 Jul 2021 12:54:01 +0000
Subject: [PATCH] Fix for updating MAC address from RedFish
@@ -27,14 +27,14 @@ Response code: {"200 OK"} received.
Signed-off-by: sunitakx <sunitax.kumari@linux.intel.com>
---
src/ethernet_interface.cpp | 19 +++++++++++++------
- src/ethernet_interface.hpp | 4 ++++
- 2 files changed, 17 insertions(+), 6 deletions(-)
+ src/ethernet_interface.hpp | 5 +++++
+ 2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
-index 9a4d95a..95cd70b 100644
+index 666173e6587e..95bc8db9cd3a 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
-@@ -139,6 +139,8 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
+@@ -144,6 +144,8 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
{
this->emit_object_added();
}
@@ -43,7 +43,7 @@ index 9a4d95a..95cd70b 100644
}
static IP::Protocol convertFamily(int family)
-@@ -1069,8 +1071,18 @@ void EthernetInterface::writeDHCPSection(std::fstream& stream)
+@@ -1129,8 +1131,18 @@ void EthernetInterface::writeDHCPSection(std::fstream& stream)
}
}
@@ -62,7 +62,7 @@ index 9a4d95a..95cd70b 100644
ether_addr newMAC;
try
{
-@@ -1104,12 +1116,7 @@ std::string EthernetInterface::macAddress(std::string value)
+@@ -1164,12 +1176,7 @@ std::string EthernetInterface::macAddress(std::string value)
intf->MacAddressIntf::macAddress(validMAC);
}
MacAddressIntf::macAddress(validMAC);
@@ -77,10 +77,10 @@ index 9a4d95a..95cd70b 100644
}
diff --git a/src/ethernet_interface.hpp b/src/ethernet_interface.hpp
-index ebba151..ebe72a1 100644
+index 6c7bd69ef987..acf6b6792b75 100644
--- a/src/ethernet_interface.hpp
+++ b/src/ethernet_interface.hpp
-@@ -11,6 +11,7 @@
+@@ -11,11 +11,14 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/server/object.hpp>
@@ -88,23 +88,22 @@ index ebba151..ebe72a1 100644
#include <string>
#include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
-@@ -25,6 +26,7 @@
- #define nicEnabled nICEnabled
- #define ntpServers nTPServers
- #endif
+ #include <xyz/openbmc_project/Network/MACAddress/server.hpp>
+
+static constexpr const uint32_t defaultTimeout = 1;
-
++
namespace phosphor
{
-@@ -93,6 +95,8 @@ class EthernetInterface : public Ifaces
+ namespace network
+@@ -83,6 +86,8 @@ class EthernetInterface : public Ifaces
EthernetInterface& operator=(EthernetInterface&&) = delete;
virtual ~EthernetInterface() = default;
-
+
+ std::unique_ptr<phosphor::Timer> macUpdateTimer;
+ void macAddressTimeoutHandler();
/** @brief Constructor to put object onto bus at a dbus path.
* @param[in] bus - Bus to attach to.
* @param[in] objPath - Path to attach at.
---
+--
2.17.1