[Feature][ZXW-237]merge P54U03 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: Id39ef8b992af691eab09c01d4ea26da89e5f4049
diff --git a/ap/app/Script/scripts/wan_ipv6_config.sh b/ap/app/Script/scripts/wan_ipv6_config.sh
index 1c1e278..9098fab 100755
--- a/ap/app/Script/scripts/wan_ipv6_config.sh
+++ b/ap/app/Script/scripts/wan_ipv6_config.sh
@@ -264,7 +264,23 @@
ndp_kill
zte_ndp -a -s br0 -d "$wan_if" -l $ndp_log &
-
+ xlat_enable=`nv get xlat_enable`
+ if [ "-$xlat_enable" == "-1" ];then
+ route_info=`route|grep default`
+ if [ "$route_info" == "" ];then
+ xlat_prefix=`nv get xlat_prefix`
+ #chmod 777 /dev/net/tun
+ if [ "$xlat_prefix" == "" ];then
+ clatd -i $defwan6_if &
+ else
+ clatd -i $defwan6_if -p $xlat_prefix &
+ fi
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+ iptables -t nat -A POSTROUTING -o v4-$defwan6_if -j MASQUERADE
+ sleep 1
+ ip route add default dev v4-$defwan6_if
+ fi
+ fi
}
############ipv6 shell entry#################