From: Florian Fainelli Date: Sun, 14 Mar 2010 16:40:56 +0000 (+0000) Subject: make 6tunnel support a delegated block (#4724) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=551cf72022e76ee871af1ab5513a695918d43e19;p=openwrt%2Fsvn-archive%2Fpackages.git make 6tunnel support a delegated block (#4724) SVN-Revision: 20206 --- diff --git a/ipv6/6scripts/Makefile b/ipv6/6scripts/Makefile index f4e54fe6b..fb4d0df1e 100644 --- a/ipv6/6scripts/Makefile +++ b/ipv6/6scripts/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6scripts PKG_VERSION:=0.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 include $(INCLUDE_DIR)/package.mk diff --git a/ipv6/6scripts/files/6tunnel.conf b/ipv6/6scripts/files/6tunnel.conf index d334338f8..f65691dfd 100644 --- a/ipv6/6scripts/files/6tunnel.conf +++ b/ipv6/6scripts/files/6tunnel.conf @@ -14,3 +14,5 @@ config 6tunnel option mtu '1280' # this should provide a ttl for your tunnel interface option ttl '64' + # provide your tunnel provider's delegated block (/64 or /48) + option delegatedip6 '' diff --git a/ipv6/6scripts/files/6tunnel.init b/ipv6/6scripts/files/6tunnel.init index 5c21e7db9..de01473c1 100644 --- a/ipv6/6scripts/files/6tunnel.init +++ b/ipv6/6scripts/files/6tunnel.init @@ -17,13 +17,16 @@ start_service() { config_get remoteip6 "$section" remoteip6 config_get ttl "$section" ttl config_get mtu "$section" mtu + config_get delegatedip6 "$section" delegatedip6 ip tunnel add $tnlifname mode sit remote $remoteip4 local $localip4 ttl 255 ifconfig $tnlifname up ip link set mtu $mtu dev $tnlifname ip tunnel change $tnlifname ttl $ttl ip addr add $localip6 dev $tnlifname + ip -6 route ::/0 dev $tnlifname ip -6 route add 2000::/3 via $remoteip6 + ip -6 route add $delegatedip6 dev $LAN } stop_service() { @@ -41,7 +44,9 @@ stop_service() { config_get remoteip6 "$section" remoteip6 config_get ttl "$section" ttl config_get mtu "$section" mtu + config_get delegatedip6 "$section" delegatedip6 + ip -6 ro del $delegatedip6 dev $LAN ip -6 ro del 2000::/3 via $remoteip6 ip -6 ro del ::/0 dev $tnlifname ip addr del $localip6 dev $tnlifname