diff options
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/dns-type.c | 2 | ||||
-rw-r--r-- | src/resolve/resolved-conf.h | 2 | ||||
-rw-r--r-- | src/resolve/resolved-etc-hosts.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c index aaf5ed62c1..d89ae28dcd 100644 --- a/src/resolve/dns-type.c +++ b/src/resolve/dns-type.c @@ -29,7 +29,7 @@ typedef const struct { } dns_type; static const struct dns_type_name * -lookup_dns_type (register const char *str, register unsigned int len); +lookup_dns_type (register const char *str, register GPERF_LEN_TYPE len); #include "dns_type-from-name.h" #include "dns_type-to-name.h" diff --git a/src/resolve/resolved-conf.h b/src/resolve/resolved-conf.h index fc425a36b2..8184d6cadf 100644 --- a/src/resolve/resolved-conf.h +++ b/src/resolve/resolved-conf.h @@ -41,7 +41,7 @@ int manager_parse_search_domains_and_warn(Manager *m, const char *string); int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char *word); int manager_parse_dns_server_string_and_warn(Manager *m, DnsServerType type, const char *string); -const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, unsigned length); +const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, GPERF_LEN_TYPE length); int config_parse_dns_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_search_domains(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c index 40d650949d..0a284825a1 100644 --- a/src/resolve/resolved-etc-hosts.c +++ b/src/resolve/resolved-etc-hosts.c @@ -431,8 +431,8 @@ int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer) { for (i = 0; i < bn->n_items; i++) { _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL; - if ((found_a && bn->items[i]->family != AF_INET) && - (found_aaaa && bn->items[i]->family != AF_INET6)) + if ((!found_a && bn->items[i]->family == AF_INET) || + (!found_aaaa && bn->items[i]->family == AF_INET6)) continue; r = dns_resource_record_new_address(&rr, bn->items[i]->family, &bn->items[i]->address, bn->name); @@ -444,5 +444,5 @@ int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer) { return r; } - return 1; + return found_a || found_aaaa; } |