summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.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-address.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-address.c')
-rw-r--r--src/network/networkd-address.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index e6e3f8f067..6977fe7947 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -313,7 +313,8 @@ int config_parse_dns(const char *unit,
const char *rvalue,
void *data,
void *userdata) {
- Set **dns = data;
+ Network *network = userdata;
+ Address *tail;
_cleanup_address_free_ Address *n = NULL;
int r;
@@ -321,7 +322,7 @@ int config_parse_dns(const char *unit,
assert(section);
assert(lvalue);
assert(rvalue);
- assert(data);
+ assert(network);
r = address_new_dynamic(&n);
if (r < 0)
@@ -334,7 +335,8 @@ int config_parse_dns(const char *unit,
return 0;
}
- set_put(*dns, n);
+ LIST_FIND_TAIL(addresses, network->dns, tail);
+ LIST_INSERT_AFTER(addresses, network->dns, tail, n);
n = NULL;
return 0;