diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-08 13:37:04 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-08 14:45:14 +0100 |
commit | dd51c4332f19f26d80e2129e1c27fb83a0389ac2 (patch) | |
tree | 2c34a5997a26af93bd9ab7503a809aa1ee29ba88 | |
parent | resolve/mdns: allow mDNS queries with truncation flag (diff) | |
download | systemd-dd51c4332f19f26d80e2129e1c27fb83a0389ac2.tar.xz systemd-dd51c4332f19f26d80e2129e1c27fb83a0389ac2.zip |
resolve/mdns: silently ignore Known-Answers only packets
-rw-r--r-- | src/resolve/resolved-mdns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index 11e3b14125..b63073af7f 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -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)) { |