aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ippp
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-ippp')
-rwxr-xr-xsysconfig/network-scripts/ifup-ippp7
1 files changed, 2 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp
index 6ab69117..3ba93328 100755
--- a/sysconfig/network-scripts/ifup-ippp
+++ b/sysconfig/network-scripts/ifup-ippp
@@ -359,13 +359,10 @@ function addprovider()
if [ "$DIALMODE" = "auto" ] ; then
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
if [ "$DEFROUTE" = "yes" ] ; then
- route del default >/dev/null 2>&1
if [ "$GATEWAY" = "0.0.0.0" ]; then
- route add default ${METRIC:+metric $METRIC} $DEVICE \
- >/dev/null 2>&1
+ ip route replace default ${METRIC:+metric $METRIC} dev ${DEVICE} >/dev/null 2>&1
else
- route add default gw $GATEWAY ${METRIC:+metric $METRIC} \
- >/dev/null 2>&1
+ ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} dev ${DEVICE} >/dev/null 2>&1
fi
fi
fi