diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2021-02-15 19:03:27 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-02-24 17:17:03 +0100 |
commit | 7675501540980eff80c0e055c219e5e1efde6b62 (patch) | |
tree | 72975bed626ecfccd8e1f0339f4b35225edc8817 /src/resolve/resolved-mdns.c | |
parent | 836590f75b82f0df1b49fb79b99d4defa8d51ff0 (diff) | |
download | systemd-7675501540980eff80c0e055c219e5e1efde6b62.tar.gz |
resolved: don't discard mDNS packets with ip6.arpa RRs
ip6.arpa is also a valid domain name to put in mDNS packets.
Diffstat (limited to 'src/resolve/resolved-mdns.c')
-rw-r--r-- | src/resolve/resolved-mdns.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index cf310ea01e..15843e90b9 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; |