mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 20:50:38 +02:00
[package] 6to4: implement metric option
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24021 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b71062831c
commit
071cb95324
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=6to4
|
PKG_NAME:=6to4
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -43,6 +43,9 @@ setup_interface_6to4() {
|
|||||||
local ttl
|
local ttl
|
||||||
config_get ttl "$cfg" ttl
|
config_get ttl "$cfg" ttl
|
||||||
|
|
||||||
|
local metric
|
||||||
|
config_get metric "$cfg" metric
|
||||||
|
|
||||||
local defaultroute
|
local defaultroute
|
||||||
config_get_bool defaultroute "$cfg" defaultroute 1
|
config_get_bool defaultroute "$cfg" defaultroute 1
|
||||||
|
|
||||||
@ -91,7 +94,7 @@ setup_interface_6to4() {
|
|||||||
|
|
||||||
[ "$defaultroute" = 1 ] && {
|
[ "$defaultroute" = 1 ] && {
|
||||||
logger -t "$link" " * Adding default route"
|
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
|
uci_set_state network "$cfg" defaultroute 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user