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:
Fletcher Woodruff
2025-12-11 15:30:22 -08:00
committed by Daan De Meyer
parent 7c0afcdde2
commit 65eebee9bf

View File

@@ -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);