From 2f6b787a7b947c385e308d92e3fc83126b2cf8a6 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 5 Mar 2008 21:34:40 +0000 Subject: always set interface for unlisted devices --- lib/network/connection/ethernet.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/network/connection/ethernet.pm') diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index c676688..16fe0c9 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -24,7 +24,8 @@ sub get_unlisted_devices { my ($interfaces, $listed_devices) = @_; my @unlisted_interfaces = sort(difference2($interfaces, [ map { device_to_interface($_) } @$listed_devices ])); map { - my %device = %{interface_to_device($_) || +{ interface => $_, description => $_ }}; + my %device = %{interface_to_device($_) || +{ description => $_ }}; + $device{interface} = $_; $device{description} = N("Virtual interface") if network::tools::is_virtual_interface($_); \%device; } @unlisted_interfaces; -- cgit v1.2.1