bool dns_server_limited_domains(DnsServer *server) {
        DnsSearchDomain *domain;
        bool domain_restricted = false;

        /* Check if the server has route-only domains without ~., i. e. whether
         * it should only be used for particular domains */
        if (!server->link)
                return false;

        LIST_FOREACH(domains, domain, server->link->search_domains)
                if (domain->route_only) {
                        domain_restricted = true;
                        /* ~. means "any domain", thus it is a global server */
                        if (dns_name_is_root(DNS_SEARCH_DOMAIN_NAME(domain)))
                                return false;
                }

        return domain_restricted;
}
bool dns_server_limited_domains(DnsServer *server) {
        DnsSearchDomain *domain;
        bool domain_restricted = false;

         
        if (!server->link)
                return false;

        LIST_FOREACH(domains, domain, server->link->search_domains)
                if (domain->route_only) {
                        domain_restricted = true;
                         
                        if (dns_name_is_root(DNS_SEARCH_DOMAIN_NAME(domain)))
                                return false;
                }

        return domain_restricted;
}