summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-23 13:48:18 +0200
committerTom Gundersen <teg@jklm.no>2014-07-23 23:54:51 +0200
commitb0e39c8284b5195850a58e4efcce2f059bdcc6ad (patch)
treee5f1183bec258450f9cd59ce1a8e255179467e0d /src/network/networkd-network.c
parent36d054aae0847df38687640909304dde1452b22d (diff)
networkd: merge DNS and NTP entries when exporting
In the state files, do not distinguish where the various entries came from (static or DHCP), but include them all in the same list.
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index bc9304291e..24fc26b929 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -169,15 +169,8 @@ void network_free(Network *network) {
free(network->description);
free(network->dhcp_vendor_class_identifier);
- 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);
- }
+ strv_free(network->ntp);
+ strv_free(network->dns);
netdev_unref(network->bridge);