ethernet_interface: Remove spurious reloads
Change-Id: I0929452666d50e8093670af36df77e05adb188d7
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index 2e1e252..102173f 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
@@ -262,6 +262,10 @@
}
else
{
+ if (it->second->origin() == IP::AddressOrigin::Static)
+ {
+ return it->second->getObjPath();
+ }
it->second->IPIfaces::origin(IP::AddressOrigin::Static);
}
@@ -313,7 +317,12 @@
}
else
{
- it->second->NeighborObj::macAddress(std::to_string(lladdr));
+ auto str = std::to_string(lladdr);
+ if (it->second->macAddress() == str)
+ {
+ return it->second->getObjPath();
+ }
+ it->second->NeighborObj::macAddress(str);
}
writeConfigurationFile();