summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>2018-01-03 14:42:13 +0200
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>2018-01-03 15:04:20 +0200
commitcfcc8dcc86b4c18cc5885031c661c7f9ae32f781 (patch)
tree5274cfe7e895f99b3e59efa5d46e3303ea0da1e0 /src/resolve
parent432d108c25a9705f1564d7620c38cdf890df40ba (diff)
downloadsystemd-cfcc8dcc86b4c18cc5885031c661c7f9ae32f781.tar.gz
resolved: skip conflict notifications for DNS-SD PTR RRs
Enumerating DNS-SD PTR resource records are a special case and are supposed to have non-unique keys pointing to services of the same type running on different hosts. There's no need for them to be checked for conflicts. Thus don't check for conflicts such RRs.
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-scope.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 9247bb34e6..9935398c17 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -991,6 +991,10 @@ void dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p) {
for (i = 0; i < p->answer->n_rrs; i++) {
+ /* No conflict if it is DNS-SD RR used for service enumeration. */
+ if (dns_resource_key_is_dnssd_ptr(p->answer->items[i].rr->key))
+ continue;
+
/* Check for conflicts against the local zone. If we
* found one, we won't check any further */
r = dns_zone_check_conflicts(&scope->zone, p->answer->items[i].rr);