aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-eth
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-02-28 20:27:10 +0000
committerBill Nottingham <notting@redhat.com>2006-02-28 20:27:10 +0000
commit2c930b8c9715e6f1b48ca6a0f27e916f247818e4 (patch)
tree4047d992c0ae870ce309f57ca1a42635da2e3720 /sysconfig/network-scripts/ifup-eth
parent90004e3f54a4f58aa7a415781b0a0824fb9d7eb2 (diff)
downloadinitscripts-2c930b8c9715e6f1b48ca6a0f27e916f247818e4.tar
initscripts-2c930b8c9715e6f1b48ca6a0f27e916f247818e4.tar.gz
initscripts-2c930b8c9715e6f1b48ca6a0f27e916f247818e4.tar.bz2
initscripts-2c930b8c9715e6f1b48ca6a0f27e916f247818e4.tar.xz
initscripts-2c930b8c9715e6f1b48ca6a0f27e916f247818e4.zip
Fix potentials for endless loops when you have multiple devices
that claim to have the same hardware address. (#177792, #182466) This happens most with hostap_cs and similar wireless drivers that have ethX/wlanX *and* wifiX. Do this by ignoring ieee802.11 links. Also, use /sbin/ip, not nameif - it gets confused in these cases as well.
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-xsysconfig/network-scripts/ifup-eth2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 2e7ca951..45efb881 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -40,7 +40,7 @@ is_available ${REALDEVICE}
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
- curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 "/$HWADDR/ { print \\$2 }"`
+ curdev=`ip -o link | grep -v link/ieee802.11 | awk -F ': ' -vIGNORECASE=1 "/$HWADDR/ { print \\$2 }"`
if [ -n "$curdev" ]; then
rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."