diff options
-rw-r--r-- | lib/network/connection/ethernet.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 1e680af..f0ef857 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -24,11 +24,9 @@ sub get_unlisted_devices { my ($interfaces, $listed_devices) = @_; my @unlisted_interfaces = sort(difference2($interfaces, [ map { device_to_interface($_) } @$listed_devices ])); map { - interface_to_device($_) || - +{ - description => network::tools::is_virtual_interface($_) ? N("Virtual interface") : $_, - interface => $_ - }; + my %device = %{interface_to_device($_) || +{ interface => $_, description => $_ }}; + $device{description} = N("Virtual interface") if network::tools::is_virtual_interface($_); + \%device; } @unlisted_interfaces; } |