]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: don't honour mDNS cache-flush bit for OPT RRs
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:27:16 +0000 (19:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:27:16 +0000 (19:27 +0100)
OPT RRs after all use the class field for other purposes than actually
encoding a class, hence the cache flush bit doesn't apply really.

src/resolve/resolved-dns-packet.c

index bb299462a77c988a8453e4aab96ec8f8e5f0ed64..2b7d634a519d372672581be15d509a37cf5dde64 100644 (file)
@@ -1483,7 +1483,7 @@ int dns_packet_read_key(DnsPacket *p, DnsResourceKey **ret, size_t *start) {
         if (p->protocol == DNS_PROTOCOL_MDNS) {
                 /* See RFC6762, Section 10.2 */
 
-                if (class & MDNS_RR_CACHE_FLUSH)
+                if (type != DNS_TYPE_OPT && (class & MDNS_RR_CACHE_FLUSH))
                         class &= ~MDNS_RR_CACHE_FLUSH;
                 else
                         cache_flush = false;