]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: skip conflict notifications for DNS-SD PTR RRs
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Wed, 3 Jan 2018 12:42:13 +0000 (14:42 +0200)
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Wed, 3 Jan 2018 13:04:20 +0000 (15:04 +0200)
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.

src/resolve/resolved-dns-scope.c

index 9247bb34e6deb9668a2fadfdf83bc0bd3c6a1f4e..9935398c172bd9d72bf9d5aa845e75c04b5e76d4 100644 (file)
@@ -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);