diff options
author | Bill Nottingham <notting@redhat.com> | 2010-12-06 15:05:38 -0500 |
---|---|---|
committer | Petr Lautrbach <plautrba@redhat.com> | 2010-12-08 10:49:56 +0100 |
commit | 59fdfdca21a4961e67a1bbd32092a110ffc747fc (patch) | |
tree | 72664e5e63c586207cf1b8914f833a4993ccf178 | |
parent | 36e6bc05fba18b83681499ce0b6a536e3d7c29af (diff) | |
download | initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.gz initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.bz2 initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.tar.xz initscripts-59fdfdca21a4961e67a1bbd32092a110ffc747fc.zip |
Fix routing regression (#660363)
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 2 |
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} |