summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-29 20:01:04 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-29 20:01:04 +0000
commit7f5968708c6a34324560a10098a8473a62a59ed9 (patch)
tree951de92eb1de83bfcae883f21834162a7f58c1fd
parentddc39f3e8846ef21f6f2c0b47b81cd6c1cdbb9e3 (diff)
downloaddrakx-net-7f5968708c6a34324560a10098a8473a62a59ed9.tar
drakx-net-7f5968708c6a34324560a10098a8473a62a59ed9.tar.gz
drakx-net-7f5968708c6a34324560a10098a8473a62a59ed9.tar.bz2
drakx-net-7f5968708c6a34324560a10098a8473a62a59ed9.tar.xz
drakx-net-7f5968708c6a34324560a10098a8473a62a59ed9.zip
fix crash during ethernet devices detection (#33517, undefined value as a HASH reference)
-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)