resolve: support address with ifname in /etc/hosts

This commit is contained in:
Yu Watanabe 2018-07-31 16:12:13 +09:00
parent 0351eb1148
commit 7bf8c3ded4
1 changed files with 1 additions and 1 deletions

View File

@ -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);