mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
resolve: actually shows information about all specified interfaces
This commit is contained in:
parent
1238250f1d
commit
2892077c93
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user