summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-19 18:42:14 +0200
committerTom Gundersen <teg@jklm.no>2014-05-19 18:42:14 +0200
commitbcb7a07e0a785bda1eed658e984ff6b4a11cba9a (patch)
treeca7b9498783bac32e153b2059cea24863a6642e4 /src/network/networkd-network.c
parentd408b506814a0f99590d946b3bf99b57ba78336b (diff)
networkd/sd-network: expose statically configured NTP servers
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 1b8856afeb..a6cbee2397 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -81,6 +81,7 @@ static int network_load_one(Manager *manager, const char *filename) {
if (!network->filename)
return log_oom();
+ network->dhcp_ntp = true;
network->dhcp_dns = true;
network->dhcp_hostname = true;
network->dhcp_domainname = true;
@@ -160,6 +161,11 @@ void network_free(Network *network) {
free(network->description);
+ while ((address = network->ntp)) {
+ LIST_REMOVE(addresses, network->ntp, address);
+ address_free(address);
+ }
+
while ((address = network->dns)) {
LIST_REMOVE(addresses, network->dns, address);
address_free(address);
@@ -234,7 +240,7 @@ int network_apply(Manager *manager, Network *network, Link *link) {
link->network = network;
- if (network->dns) {
+ if (network->dns || network->ntp) {
r = link_save(link);
if (r < 0)
return r;