summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index f2546440cf..f987310011 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -144,6 +144,8 @@ void network_free(Network *network) {
free(network->description);
+ address_free(network->dns);
+
while ((route = network->static_routes))
route_free(route);
@@ -197,6 +199,12 @@ int network_apply(Manager *manager, Network *network, Link *link) {
if (r < 0)
return r;
+ if (network->dns) {
+ r = manager_update_resolv_conf(manager);
+ if (r < 0)
+ return r;
+ }
+
return 0;
}