6rd: add support for native IPv6 prefix handling

SVN-Revision: 35173
This commit is contained in:
Steven Barth 2013-01-15 13:08:14 +00:00
parent 811cd2acf4
commit 955a1e8e28
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -42,8 +42,12 @@ proto_6rd_setup() {
local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen") local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen")
local ip6addr="${ip6subnet%%::*}::1" local ip6addr="${ip6subnet%%::*}::1"
# Determine the IPv6 prefix
local ip6lanprefix="$ip6subnet/$(($ip6prefixlen + 32 - $ip4prefixlen))"
proto_init_update "$link" 1 proto_init_update "$link" 1
proto_add_ipv6_address "$ip6addr" "$ip6prefixlen" proto_add_ipv6_address "$ip6addr" "$ip6prefixlen"
proto_add_ipv6_prefix "$ip6lanprefix"
proto_add_ipv6_route "::" 0 "::$peeraddr" proto_add_ipv6_route "::" 0 "::$peeraddr"
proto_add_tunnel proto_add_tunnel