aboutsummaryrefslogtreecommitdiff
path: root/net.Linux/pppd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net.Linux/pppd.sh')
-rw-r--r--net.Linux/pppd.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/net.Linux/pppd.sh b/net.Linux/pppd.sh
index 311bb8de..d8448f81 100644
--- a/net.Linux/pppd.sh
+++ b/net.Linux/pppd.sh
@@ -20,6 +20,9 @@ pppd_pre_start() {
# Interface has to be called ppp
[ "${IFACE%%[0-9]*}" = "ppp" ] || return 0
+ # Set our base metric
+ metric=4000
+
if ${IN_BACKGROUND} ; then
local config=
eval config=\$config_${IFVAR}
@@ -87,7 +90,8 @@ pppd_pre_start() {
if ! ${hasdefaultmetric} ; then
local m=\$metric_${IFVAR}
- [ -n "${m}" ] && opts="${opts} defaultmetric ${m}"
+ [ -z "${m}" ] && m=$((${metric} + _ifindex))
+ opts="${opts} defaultmetric ${m}"
fi
if [ -n "${mtu}" ] ; then
${hasmtu} || opts="${opts} mtu ${mtu}"