summaryrefslogtreecommitdiff
path: root/package/network/ipv6/6rd/files
diff options
context:
space:
mode:
authorcyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-15 13:08:14 +0000
committercyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-15 13:08:14 +0000
commitb81f0c9e0f3f557ccc7717af4c091dedd18d61da (patch)
treedb1a92f56cd23636c07f8d28125e618f7131a018 /package/network/ipv6/6rd/files
parent3b4ac5a6df082976d6c244a659715ce68400eb34 (diff)
6rd: add support for native IPv6 prefix handling
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35173 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/6rd/files')
-rw-r--r--package/network/ipv6/6rd/files/6rd.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh
index 59c3169b39..b681f2bbe6 100644
--- a/package/network/ipv6/6rd/files/6rd.sh
+++ b/package/network/ipv6/6rd/files/6rd.sh
@@ -42,8 +42,12 @@ 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_prefix "$ip6lanprefix"
proto_add_ipv6_route "::" 0 "::$peeraddr"
proto_add_tunnel