6rd: add support for native IPv6 prefix handling

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35173 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
Steven Barth
2013-01-15 13:08:14 +00:00
parent cbfa80a7d3
commit ca6e8fdcec
2 changed files with 5 additions and 1 deletions

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6rd
PKG_VERSION:=2
PKG_VERSION:=3
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk

View File

@@ -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