resolve: actually shows information about all specified interfaces

This commit is contained in:
Yu Watanabe 2018-03-20 18:11:39 +09:00
parent 1238250f1d
commit 2892077c93

View file

@ -2421,11 +2421,11 @@ int main(int argc, char **argv) {
STRV_FOREACH(ifname, argv + optind) {
int ifindex, q;
q = parse_ifindex(argv[optind], &ifindex);
q = parse_ifindex(*ifname, &ifindex);
if (q < 0) {
ifindex = if_nametoindex(argv[optind]);
ifindex = if_nametoindex(*ifname);
if (ifindex <= 0) {
log_error_errno(errno, "Failed to resolve interface name: %s", argv[optind]);
log_error_errno(errno, "Failed to resolve interface name '%s': %m", *ifname);
continue;
}
}