summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-09-30 18:17:43 +0200
committerTom Gundersen <teg@jklm.no>2015-10-21 03:24:23 +0200
commit84de38c56915e14c148f558c6acc489a00755696 (patch)
treee63d3a633e98f990e6eece6b0eed9eb827235238 /src/network/networkd-address.c
parente7780c8d44ee32ecf6127f45c0188483c041e2e5 (diff)
networkd: manager/link - only serialize once per event-loop iteration
Every time the state is written out we may trigger third-party apps, so let's be a bit more careful about writing this out unnecessarily.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 8b3694d07f..5d443e9b9b 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -98,7 +98,6 @@ void address_free(Address *address) {
if (address->link) {
set_remove(address->link->addresses, address);
set_remove(address->link->addresses_foreign, address);
- link_save(address->link);
}
free(address);
@@ -277,7 +276,8 @@ static int address_add(Link *link, int family, const union in_addr_union *in_add
if (r < 0)
return r;
- link_save(link);
+ link_update_operstate(link);
+ link_dirty(link);
return 0;
}
@@ -334,6 +334,8 @@ int address_drop(Address *address) {
address_release(address);
address_free(address);
+ link_update_operstate(link);
+
if (link && !ready)
link_check_ready(link);