summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-etc-hosts.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-07-31 09:12:13 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-07-31 09:12:13 +0200
commit7bf8c3ded4c019c1d9ccb139483a074e8a9ac912 (patch)
tree3980cd7037e50aa67b34b9a9534149d56cd5484d /src/resolve/resolved-etc-hosts.c
parentresolve: use in_addr_data type for storing address (diff)
downloadsystemd-7bf8c3ded4c019c1d9ccb139483a074e8a9ac912.tar.xz
systemd-7bf8c3ded4c019c1d9ccb139483a074e8a9ac912.zip
resolve: support address with ifname in /etc/hosts
Diffstat (limited to '')
-rw-r--r--src/resolve/resolved-etc-hosts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c
index 2b9ce6ea1b..f42a73f7ba 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);