]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve/mdns: silently ignore Known-Answers only packets 29927/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Nov 2023 12:37:04 +0000 (21:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Nov 2023 13:45:14 +0000 (22:45 +0900)
src/resolve/resolved-mdns.c

index 11e3b14125313a3076cba951b07562ac15ad067c..b63073af7fd40579156db7323fa725626a9f70ec 100644 (file)
@@ -254,8 +254,9 @@ static int mdns_scope_process_query(DnsScope *s, DnsPacket *p) {
         if (r < 0)
                 return log_debug_errno(r, "Failed to extract resource records from incoming packet: %m");
 
+        /* TODO: Support Known-Answers only packets gracefully. */
         if (dns_question_size(p->question) <= 0)
-                return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), "Received mDNS query without question, ignoring.");
+                return 0;
 
         unicast_reply = mdns_should_reply_using_unicast(p);
         if (unicast_reply && !sender_on_local_subnet(s, p)) {