[Feature][ZXW-136]merge P50U04 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: I7b6a8e22777591bc7a9ede91d6695d9415116f81
diff --git a/ap/app/Script/scripts/lan.sh b/ap/app/Script/scripts/lan.sh
index a1c74d1..6c471e9 100755
--- a/ap/app/Script/scripts/lan.sh
+++ b/ap/app/Script/scripts/lan.sh
@@ -71,7 +71,7 @@
webv6_enable=`nv get webv6_enable`
ipv6=`nv get lan_ipv6addr`
if [ "x$webv6_enable" == "x1" ]; then
- ifconfig $lan_if $ipv6
+ ifconfig $lan_if $ipv6/64
if [ $? -ne 0 ];then
echo "Error: ifconfig $lan_if $ipv6 failed." >> $test_log
fi
diff --git a/ap/app/Script/scripts/psext_down_ipv6.sh b/ap/app/Script/scripts/psext_down_ipv6.sh
index 2ce0d21..c738a77 100755
--- a/ap/app/Script/scripts/psext_down_ipv6.sh
+++ b/ap/app/Script/scripts/psext_down_ipv6.sh
@@ -39,7 +39,7 @@
#if [ $? -ne 0 ];then
# echo "Error: ip -6 addr del $ps_ip/126 dev $ps_if failed." >> $test_log
#fi
- ip -6 route del default
+ ip -6 route del default dev $ps_if
#if [ $? -ne 0 ];then
# echo "Error: ip -6 route del default failed." >> $test_log
#fi
diff --git a/ap/app/Script/scripts/psext_up_ipv6.sh b/ap/app/Script/scripts/psext_up_ipv6.sh
index 71890e0..302b842 100755
--- a/ap/app/Script/scripts/psext_up_ipv6.sh
+++ b/ap/app/Script/scripts/psext_up_ipv6.sh
@@ -77,11 +77,18 @@
ip6tables -t filter -A FORWARD -p icmpv6 --icmpv6-type 135 -j DROP
ip -6 route flush cache
+
+ route_info=`ip -6 route|grep default`
- #这句设完,里面可以ping通外网了
- echo "Info: route_set ps_ip=$ps_ip" >> $test_log
- #ip -6 route add default via $ps_ip dev $ps_if
- ip -6 route add default dev $ps_if 2>>$test_log
+ if [ "$route_info" == "" ];then
+ #这句设完,里面可以ping通外网了
+ echo "Info: route_set ps_ip=$ps_ip" >> $test_log
+ #ip -6 route add default via $ps_ip dev $ps_if
+ ip -6 route add default dev $ps_if 2>>$test_log
+ else
+ echo "Debug: default route6 already exist." >> $test_log
+ fi
+
if [ $? -ne 0 ];then
echo "Error: ip -6 route add default dev $ps_if failed." >> $test_log
fi
diff --git a/ap/app/Script/scripts/psext_updown_ipv6.sh b/ap/app/Script/scripts/psext_updown_ipv6.sh
index a48bd73..81be275 100755
--- a/ap/app/Script/scripts/psext_updown_ipv6.sh
+++ b/ap/app/Script/scripts/psext_updown_ipv6.sh
@@ -199,11 +199,18 @@
ip6tables -t filter -A FORWARD -p icmpv6 --icmpv6-type 135 -j DROP
ip -6 route flush cache
+
+ route_info=`ip -6 route|grep default`
- #这句设完,里面可以ping通外网了
- echo "Info: route_set ps_ip=$ps_ip" >> $test_log
- #ip -6 route add default via $ps_ip dev $ps_if
- ip -6 route add default dev $ps_if 2>>$test_log
+ if [ "$route_info" == "" ];then
+ #这句设完,里面可以ping通外网了
+ echo "Info: route_set ps_ip=$ps_ip" >> $test_log
+ #ip -6 route add default via $ps_ip dev $ps_if
+ ip -6 route add default dev $ps_if 2>>$test_log
+ else
+ echo "Debug: default route6 already exist." >> $test_log
+ fi
+
if [ $? -ne 0 ];then
echo "Error: ip -6 route add default dev $ps_if failed." >> $test_log
fi
@@ -377,7 +384,7 @@
#if [ $? -ne 0 ];then
# echo "Error: ip -6 addr del $ps_ip/126 dev $ps_if failed." >> $test_log
#fi
- ip -6 route del default
+ ip -6 route del default dev $ps_if
#if [ $? -ne 0 ];then
# echo "Error: ip -6 route del default failed." >> $test_log
#fi