aboutsummaryrefslogtreecommitdiffstats
path: root/package/6to4/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-17 19:12:28 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-17 19:12:28 +0000
commit2016e3a14e3d8486779705ae9ed813a4a4d23a3a (patch)
treec1aff006204b7d89fdc00580469b5ab8b37508ad /package/6to4/files
parent5689b649eb3abda4b87221f542131a308f8ec628 (diff)
downloadupstream-2016e3a14e3d8486779705ae9ed813a4a4d23a3a.tar.gz
upstream-2016e3a14e3d8486779705ae9ed813a4a4d23a3a.tar.bz2
upstream-2016e3a14e3d8486779705ae9ed813a4a4d23a3a.zip
[package] 6to4: implement metric option
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24021 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/6to4/files')
-rwxr-xr-xpackage/6to4/files/6to4.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/6to4/files/6to4.sh b/package/6to4/files/6to4.sh
index bbf8dba41b..31dd4b7c88 100755
--- a/package/6to4/files/6to4.sh
+++ b/package/6to4/files/6to4.sh
@@ -43,6 +43,9 @@ setup_interface_6to4() {
local ttl
config_get ttl "$cfg" ttl
+ local metric
+ config_get metric "$cfg" metric
+
local defaultroute
config_get_bool defaultroute "$cfg" defaultroute 1
@@ -91,7 +94,7 @@ setup_interface_6to4() {
[ "$defaultroute" = 1 ] && {
logger -t "$link" " * Adding default route"
- ip -6 route add 2000::/3 via ::192.88.99.1 dev $link metric 1
+ ip -6 route add 2000::/3 via ::192.88.99.1 metric ${metric:-1} dev $link
uci_set_state network "$cfg" defaultroute 1
}