Skip to content

Commit aa34efb

Browse files
yuwatakeszybz
authored andcommitted
resolve/mdns: silently ignore Known-Answers only packets
(cherry picked from commit dd51c43) (cherry picked from commit c4f6807)
1 parent a28a6c9 commit aa34efb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/resolve/resolved-mdns.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ static int mdns_scope_process_query(DnsScope *s, DnsPacket *p) {
254254
if (r < 0)
255255
return log_debug_errno(r, "Failed to extract resource records from incoming packet: %m");
256256

257+
/* TODO: Support Known-Answers only packets gracefully. */
257258
if (dns_question_size(p->question) <= 0)
258-
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), "Received mDNS query without question, ignoring.");
259+
return 0;
259260

260261
unicast_reply = mdns_should_reply_using_unicast(p);
261262
if (unicast_reply && !sender_on_local_subnet(s, p)) {

0 commit comments

Comments
 (0)