network_manager: Reloads should be delayed via timer
Our restarts of systemd waited a short amount of time (3s) prior to
triggering in the past and didn't cause it to reconfigure immediately.
This allowed lan users to queue up a bunch of configuration commands
that would reconfigure the network before it applied.
This patch restores that behavior.
Change-Id: I4c3c589c07528a9d90e6d7e5d3b649688fcf4587
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index 332971b..f574891 100644
--- a/src/network_manager.hpp
+++ b/src/network_manager.hpp
@@ -125,10 +125,15 @@
void setFistBootMACOnInterface(
const std::pair<std::string, std::string>& ethPair);
- /** @brief Tell systemd-network to reload all of the network configurations
+ /** @brief Arms a timer to tell systemd-network to reload all of the network
+ * configurations
*/
virtual void reloadConfigs();
+ /** @brief Tell systemd-network to reload all of the network configurations
+ */
+ void doReloadConfigs();
+
/** @brief Returns the number of interfaces under this manager.
*
* @return the number of interfaces managed by this manager.