]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: when filtering out duplicate domain names use DNS comparison
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Jan 2016 19:33:47 +0000 (20:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Jan 2016 13:42:03 +0000 (14:42 +0100)
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.

src/network/networkd-manager.c

index 7b801ae6c96d3cd70f9a38d257a08b535bddf439..e8d4b042d4dcb787630c299ee8e9fd94b52bfc47 100644 (file)
@@ -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;