From 29d96ac6e3ae53691600f578087775e153c3d832 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Mon, 15 Feb 2021 19:03:27 +0300 Subject: [PATCH] resolved: don't discard mDNS packets with ip6.arpa RRs ip6.arpa is also a valid domain name to put in mDNS packets. (cherry picked from commit 7675501540980eff80c0e055c219e5e1efde6b62) --- src/resolve/resolved-mdns.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index a093747198..3996fcab2e 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -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; -- 2.25.1