]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: make rfc4795-specific code run for LLMNR only
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Fri, 13 Oct 2017 09:19:21 +0000 (12:19 +0300)
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Fri, 8 Dec 2017 12:29:27 +0000 (14:29 +0200)
RFC6762 specifies different procedure for conflict resolution and
the code is not applicable for the mDNS case.

src/resolve/resolved-dns-zone.c

index 53a49285a835640cf011ba697daea6471dcb4700..4e543ce3d860c44deb0a923bcdb3ebb0a1e367d4 100644 (file)
@@ -526,7 +526,9 @@ void dns_zone_item_notify(DnsZoneItem *i) {
                 bool we_lost = false;
 
                 /* The probe got a successful reply. If we so far
-                 * weren't established we just give up. If we already
+                 * weren't established we just give up.
+                 *
+                 * In LLMNR case if we already
                  * were established, and the peer has the
                  * lexicographically larger IP address we continue
                  * and defend it. */
@@ -534,7 +536,7 @@ void dns_zone_item_notify(DnsZoneItem *i) {
                 if (!IN_SET(i->state, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) {
                         log_debug("Got a successful probe for not yet established RR, we lost.");
                         we_lost = true;
-                } else {
+                } else if (i->probe_transaction->scope->protocol == DNS_PROTOCOL_LLMNR) {
                         assert(i->probe_transaction->received);
                         we_lost = memcmp(&i->probe_transaction->received->sender, &i->probe_transaction->received->destination, FAMILY_ADDRESS_SIZE(i->probe_transaction->received->family)) < 0;
                         if (we_lost)