From: Lennart Poettering Date: Mon, 25 Jan 2016 19:33:47 +0000 (+0100) Subject: networkd: when filtering out duplicate domain names use DNS comparison X-Git-Tag: v229~83^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=482d1aeb671e813535f0ff9fadf4e1827ee32e20;p=thirdparty%2Fsystemd.git networkd: when filtering out duplicate domain names use DNS comparison When we collect the domain names of the various links and other sources in one ordered set, make sure to use proper DNS name comparison to filter out duplicates. --- diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 7b801ae6c96..e8d4b042d4d 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -29,6 +29,7 @@ #include "bus-util.h" #include "conf-parser.h" #include "def.h" +#include "dns-domain.h" #include "fd-util.h" #include "fileio.h" #include "libudev-private.h" @@ -852,11 +853,11 @@ static int manager_save(Manager *m) { if (!ntp) return -ENOMEM; - search_domains = ordered_set_new(&string_hash_ops); + search_domains = ordered_set_new(&dns_name_hash_ops); if (!search_domains) return -ENOMEM; - route_domains = ordered_set_new(&string_hash_ops); + route_domains = ordered_set_new(&dns_name_hash_ops); if (!route_domains) return -ENOMEM;