summaryrefslogtreecommitdiffstats
path: root/lib/network/connection/ethernet.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/connection/ethernet.pm')
-rw-r--r--lib/network/connection/ethernet.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm
index d1523cd..c99f805 100644
--- a/lib/network/connection/ethernet.pm
+++ b/lib/network/connection/ethernet.pm
@@ -429,7 +429,8 @@ sub get_eth_cards {
} else {
# 4) try to lookup a device by hardware address for device description:
# maybe should have we try sysfs first for robustness?
- ($description) = (mapIntfToDevice($interface))[0]->{description};
+ my @devices = mapIntfToDevice($interface);
+ ($description) = $devices[0]->{description} if @devices;
}
# 5) try to match a device through sysfs for driver & device description:
# (eg: ipw2100 driver for intel centrino do not support ETHTOOL)