From: Yu Watanabe Date: Tue, 31 Jul 2018 07:12:13 +0000 (+0900) Subject: resolve: support address with ifname in /etc/hosts X-Git-Tag: v240~876^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9760%2Fhead;p=thirdparty%2Fsystemd.git resolve: support address with ifname in /etc/hosts --- diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c index 2b9ce6ea1bf..f42a73f7ba0 100644 --- a/src/resolve/resolved-etc-hosts.c +++ b/src/resolve/resolved-etc-hosts.c @@ -64,7 +64,7 @@ static int parse_line(Manager *m, unsigned nr, const char *line) { return -EINVAL; } - r = in_addr_from_string_auto(address_str, &address.family, &address.address); + r = in_addr_ifindex_from_string_auto(address_str, &address.family, &address.address, NULL); if (r < 0) return log_error_errno(r, "Address '%s' is invalid, in line /etc/hosts:%u.", address_str, nr);