mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
resolved: don't discard mDNS queries with bad flags
Even though RFC 6762 specifies these bits MUST be zero, it also says they MUST be ignored on reception.
This commit is contained in:
committed by
Lennart Poettering
parent
7675501540
commit
2aaf376597
@@ -326,13 +326,10 @@ int dns_packet_validate_query(DnsPacket *p) {
|
||||
break;
|
||||
|
||||
case DNS_PROTOCOL_MDNS:
|
||||
/* RFC 6762, Section 18 */
|
||||
if (DNS_PACKET_AA(p) != 0 ||
|
||||
DNS_PACKET_RD(p) != 0 ||
|
||||
DNS_PACKET_RA(p) != 0 ||
|
||||
DNS_PACKET_AD(p) != 0 ||
|
||||
DNS_PACKET_CD(p) != 0 ||
|
||||
DNS_PACKET_RCODE(p) != 0)
|
||||
/* RFC 6762, Section 18 specifies that messages with non-zero RCODE
|
||||
* must be silently ignored, and that we must ignore the values of
|
||||
* AA, RD, RA, AD, and CD bits. */
|
||||
if (DNS_PACKET_RCODE(p) != 0)
|
||||
return -EBADMSG;
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user