mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
resolved: refuse resolving of a number of domains listed in RFC6303
We already blacklisted a few domains, add more.
This commit is contained in:
parent
5fa3be82e5
commit
c9ad0edbab
@ -385,6 +385,12 @@ DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, co
|
||||
dns_name_equal(domain, "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa") > 0)
|
||||
return DNS_SCOPE_NO;
|
||||
|
||||
/* Never respond to some of the domains listed in RFC6303 */
|
||||
if (dns_name_endswith(domain, "0.in-addr.arpa") > 0 ||
|
||||
dns_name_equal(domain, "255.255.255.255.in-addr.arpa") > 0 ||
|
||||
dns_name_equal(domain, "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa") > 0)
|
||||
return DNS_SCOPE_NO;
|
||||
|
||||
/* Always honour search domains for routing queries. Note that
|
||||
* we return DNS_SCOPE_YES here, rather than just
|
||||
* DNS_SCOPE_MAYBE, which means wildcard scopes won't be
|
||||
@ -400,7 +406,10 @@ DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, co
|
||||
if ((!dns_name_is_single_label(domain) ||
|
||||
(!(flags & SD_RESOLVED_NO_SEARCH) && dns_scope_has_search_domains(s))) &&
|
||||
dns_name_endswith(domain, "254.169.in-addr.arpa") == 0 &&
|
||||
dns_name_endswith(domain, "0.8.e.f.ip6.arpa") == 0)
|
||||
dns_name_endswith(domain, "8.e.f.ip6.arpa") == 0 &&
|
||||
dns_name_endswith(domain, "9.e.f.ip6.arpa") == 0 &&
|
||||
dns_name_endswith(domain, "a.e.f.ip6.arpa") == 0 &&
|
||||
dns_name_endswith(domain, "b.e.f.ip6.arpa") == 0)
|
||||
return DNS_SCOPE_MAYBE;
|
||||
|
||||
return DNS_SCOPE_NO;
|
||||
|
Loading…
x
Reference in New Issue
Block a user