From: Steven Barth Date: Fri, 24 May 2013 13:03:36 +0000 (+0000) Subject: AA: backport 6rd from trunk X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=47628b8682d1fdb8068194037a12eed342816341;p=openwrt%2Fsvn-archive%2Fopenwrt.git AA: backport 6rd from trunk SVN-Revision: 36707 --- 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