aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-12-06 15:05:38 -0500
committerPetr Lautrbach <plautrba@redhat.com>2010-12-08 10:49:56 +0100
commit59fdfdca21a4961e67a1bbd32092a110ffc747fc (patch)
tree72664e5e63c586207cf1b8914f833a4993ccf178
parent36e6bc05fba18b83681499ce0b6a536e3d7c29af (diff)
downloadinitscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar
initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.gz
initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.bz2
initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.xz
initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.zip
Fix routing regression (#660363)
-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 e4be0b4c..2c664382 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -280,7 +280,7 @@ else
# Set a default route.
if [ "${DEFROUTE}" != "no" ] && [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${REALDEVICE}" ]; then
# set up default gateway. replace if one already exists
- if [ -n "${GATEWAY}" -a "$(ipcalc --network ${GATEWAY} ${NETMASK} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then
+ if [ -n "${GATEWAY}" ] && [ "$(ipcalc --network ${GATEWAY} ${netmask[0]} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then
ip route replace default ${METRIC:+metric $METRIC} \
via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} \
${GATEWAYDEV:+dev $GATEWAYDEV}