summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-16 19:43:12 +0200
committerTom Gundersen <teg@jklm.no>2014-05-16 19:48:25 +0200
commitd4920165fe753751aaa274fdc568927d26284eea (patch)
tree0b537258c9bea6254b36fc4b54a9101cd8d66ac8 /src/network/networkd-network.c
parent7b4d79683998a78d6e123dd034b1e06b74d8030b (diff)
networkd: network - store DNS servers in List rather than Set
This way we preserve the order of preference.
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 2a68d3ec50..12107c9406 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -77,10 +77,6 @@ static int network_load_one(Manager *manager, const char *filename) {
if (!network->routes_by_section)
return log_oom();
- network->dns = set_new(NULL, NULL);
- if (!network->dns)
- return log_oom();
-
network->filename = strdup(filename);
if (!network->filename)
return log_oom();
@@ -164,10 +160,10 @@ void network_free(Network *network) {
free(network->description);
- SET_FOREACH(address, network->dns, i)
+ while ((address = network->dns)) {
+ LIST_REMOVE(addresses, network->dns, address);
address_free(address);
-
- set_free(network->dns);
+ }
netdev_unref(network->bridge);