]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: don't discard mDNS packets with ip6.arpa RRs
authorSergey Bugaev <bugaevc@gmail.com>
Mon, 15 Feb 2021 16:03:27 +0000 (19:03 +0300)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Feb 2021 16:17:03 +0000 (17:17 +0100)
ip6.arpa is also a valid domain name to put in mDNS packets.

src/resolve/resolved-mdns.c

index cf310ea01eb8844fab9adaa2d493cb636f2007ce..15843e90b9fe5c0437c903d2965222665384bde8 100644 (file)
@@ -289,9 +289,11 @@ static int on_mdns_packet(sd_event_source *s, int fd, uint32_t revents, void *us
                         const char *name = dns_resource_key_name(rr->key);
                         DnsTransaction *t;
 
-                        /* If the received reply packet contains ANY record that is not .local or .in-addr.arpa,
-                         * we assume someone's playing tricks on us and discard the packet completely. */
+                        /* If the received reply packet contains ANY record that is not .local
+                         * or .in-addr.arpa or .ip6.arpa, we assume someone's playing tricks on
+                         * us and discard the packet completely. */
                         if (!(dns_name_endswith(name, "in-addr.arpa") > 0 ||
+                              dns_name_endswith(name, "ip6.arpa") > 0 ||
                               dns_name_endswith(name, "local") > 0))
                                 return 0;