From da0dc16e9169686e5f64e7e9b46e6131432c3080 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 2 Feb 2006 21:32:24 +0000 Subject: move the arping to before we actually add the address. If the address is already on the device, it's a little late... (fixes a xen issue) --- sysconfig/network-scripts/ifup-eth | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 52827bcc..2e7ca951 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -214,10 +214,6 @@ else /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS fi - if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then - echo $"Error, some other host already uses address ${IPADDR}." - exit 1 - fi if [ "${DEVICE}" = "lo" ]; then SCOPE="scope host" @@ -232,6 +228,10 @@ else fi if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${IPADDR}/${PREFIX}" ; then + if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then + echo $"Error, some other host already uses address ${IPADDR}." + exit 1 + fi if ! ip addr add ${IPADDR}/${PREFIX} \ brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then echo $"Error adding address ${IPADDR} for ${DEVICE}." -- cgit v1.2.1