mirror of
https://github.com/systemd/systemd.git
synced 2026-07-24 16:25:52 +00:00
resolve: use strcmp when comparing DnsServer names
This fixes an issue where duplicate DNS Servers are added to to resolv.conf files even when all fields are the same.
This commit is contained in:
committed by
Daan De Meyer
parent
7c0afcdde2
commit
65eebee9bf
@@ -817,7 +817,7 @@ static int dns_server_compare_func(const DnsServer *x, const DnsServer *y) {
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
return streq_ptr(x->server_name, y->server_name);
|
||||
return strcmp_ptr(x->server_name, y->server_name);
|
||||
}
|
||||
|
||||
DEFINE_HASH_OPS(dns_server_hash_ops, DnsServer, dns_server_hash_func, dns_server_compare_func);
|
||||
|
||||
Reference in New Issue
Block a user