summaryrefslogtreecommitdiffstats
path: root/src/network/networkd.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-11-01 22:03:09 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-11-14 02:21:55 +0100
commitc321d332e3b2478d4d1d6faf71fd4639016e180d (patch)
treeac4380a8b3371dcc7c90fed80d683e72fffbaaf2 /src/network/networkd.c
parentnamespace-util: pin pid via pidfd during namespace_open() (diff)
downloadsystemd-c321d332e3b2478d4d1d6faf71fd4639016e180d.tar.xz
systemd-c321d332e3b2478d4d1d6faf71fd4639016e180d.zip
network: introduce manager_serialize()/deserialize()
Currently, only configuration sources and providers of addresses and routes are serialized/deserialized. This should mostly not change behavior, as dynamic (except for DHCPv4) configurations will be dropped before stopping networkd, and for DHCPv4 protocol, we have already had another logic to handle DHCPv4 configurations. Preparation for later commits.
Diffstat (limited to '')
-rw-r--r--src/network/networkd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd.c b/src/network/networkd.c
index 2d7a6421f9..883f16d81b 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -16,6 +16,7 @@
#include "networkd-conf.h"
#include "networkd-manager-bus.h"
#include "networkd-manager.h"
+#include "networkd-serialize.h"
#include "service-util.h"
#include "signal-util.h"
#include "strv.h"
@@ -100,6 +101,10 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return r;
+ r = manager_deserialize(m);
+ if (r < 0)
+ log_warning_errno(r, "Failed to deserialize the previous invocation, ignoring: %m");
+
r = manager_start(m);
if (r < 0)
return log_error_errno(r, "Could not start manager: %m");