Reduce the number of restarts of systemd-networkd

Start the timer once we get the dbus request and wait for timeout
if we get the dbus request in meanwhile, reset the timer and
wait for timeout.

Listen for ipv6 rtnetlink address also.

Resolves openbmc/openbmc#2227

Change-Id: I3f448e84107826defafb9ada523c1ab08ec1b971
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/types.hpp b/types.hpp
index f180ece..3fcbe2e 100644
--- a/types.hpp
+++ b/types.hpp
@@ -17,7 +17,13 @@
 {
 
 using namespace std::chrono_literals;
-constexpr auto networkChangeTimeout = 1s;
+
+// wait for three seconds before restarting the networkd
+constexpr auto restartTimeout = 3s;
+
+// refresh the objets after five seconds as network
+// configuration takes 3-4 sec after systemd-networkd restart.
+constexpr auto refreshTimeout = restartTimeout + 5s;
 
 namespace systemd
 {