From 7f5968708c6a34324560a10098a8473a62a59ed9 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 29 Feb 2008 20:01:04 +0000 Subject: fix crash during ethernet devices detection (#33517, undefined value as a HASH reference) --- lib/network/connection/ethernet.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/network/connection') 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) -- cgit v1.2.1