diff options
author | Steven Barth <steven@midlink.org> | 2013-05-24 13:03:36 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-05-24 13:03:36 +0000 |
commit | 18c3ded391e4c71fbf8c306a07d960e12d0f48bd (patch) | |
tree | a27f8456b9f66ec088066a2bbb13a50785ed11e6 | |
parent | e872fe0b68ef666b2ea9874c94225561b0ab95fb (diff) | |
download | upstream-18c3ded391e4c71fbf8c306a07d960e12d0f48bd.tar.gz upstream-18c3ded391e4c71fbf8c306a07d960e12d0f48bd.tar.bz2 upstream-18c3ded391e4c71fbf8c306a07d960e12d0f48bd.zip |
AA: backport 6rd from trunk
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36707 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/6rd/Makefile | 2 | ||||
-rw-r--r-- | package/6rd/files/6rd.sh | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/package/6rd/Makefile b/package/6rd/Makefile index 3d4549674f..6e77d24bc7 100644 --- a/package/6rd/Makefile +++ b/package/6rd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6rd -PKG_VERSION:=2 +PKG_VERSION:=4 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/6rd/files/6rd.sh b/package/6rd/files/6rd.sh index 59c3169b39..7d6cc3ebd3 100644 --- a/package/6rd/files/6rd.sh +++ b/package/6rd/files/6rd.sh @@ -42,9 +42,13 @@ proto_6rd_setup() { local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen") local ip6addr="${ip6subnet%%::*}::1" + # Determine the IPv6 prefix + local ip6lanprefix="$ip6subnet/$(($ip6prefixlen + 32 - $ip4prefixlen))" + proto_init_update "$link" 1 proto_add_ipv6_address "$ip6addr" "$ip6prefixlen" - proto_add_ipv6_route "::" 0 "::$peeraddr" + proto_add_ipv6_prefix "$ip6lanprefix" + proto_add_ipv6_route "::" 0 "::$peeraddr" 4096 proto_add_tunnel json_add_string mode sit |