]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: honour RFC6761's ban on the invalid TLD
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Dec 2015 16:38:05 +0000 (17:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 Dec 2015 10:28:02 +0000 (11:28 +0100)
src/resolve/resolved-dns-scope.c

index 4d83ac597c4a51bd0661e91c05b211fd278208ea..ac44cf23435324c80854cd74ccb501fefe07e723 100644 (file)
@@ -441,6 +441,10 @@ DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, co
             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;
 
+        /* Never respond to some of the domains listed in RFC6761 */
+        if (dns_name_endswith(domain, "invalid") > 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