summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-link-bus.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-01-22 08:05:27 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-01-22 08:08:12 +0100
commit0ce0e3470eb51242ac0bcb72f59b02d45660df16 (patch)
tree2c0177227b0d4c1834d3ef3f9b87618755557a50 /src/network/networkd-link-bus.c
parentnetwork: set dirty flag when link is being reconfigured (diff)
downloadsystemd-0ce0e3470eb51242ac0bcb72f59b02d45660df16.tar.xz
systemd-0ce0e3470eb51242ac0bcb72f59b02d45660df16.zip
network: synchronously save state file when link is being reconfigured
Diffstat (limited to 'src/network/networkd-link-bus.c')
-rw-r--r--src/network/networkd-link-bus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index 8f3b2e92f8..68889d858d 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/network/networkd-link-bus.c
@@ -620,6 +620,12 @@ int bus_link_method_reconfigure(sd_bus_message *message, void *userdata, sd_bus_
if (r < 0)
return r;
+ link_set_state(l, LINK_STATE_INITIALIZED);
+ r = link_save(l);
+ if (r < 0)
+ return r;
+ link_clean(l);
+
return sd_bus_reply_method_return(message, NULL);
}