[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/Script/scripts/internet.sh b/ap/app/Script/scripts/internet.sh
new file mode 100755
index 0000000..b9ff044
--- /dev/null
+++ b/ap/app/Script/scripts/internet.sh
@@ -0,0 +1,116 @@
+#!/bin/sh
+#
+# internet.sh,v 10.08.05 2010-08-05 15:00:00
+#
+# usage: internet.sh
+#
+path_sh=`nv get path_sh`
+. $path_sh/global.sh
+echo "Info: internet.sh start" > $test_log
+echo "Info: `date +%m-%d %H:%M:%S`" >> $test_log
+
+genSysFiles()
+{
+	login=`nv get Login`
+	pass=`nv get Password`
+	echo "$login::0:0:Adminstrator:/:/bin/sh" > /etc/passwd
+	echo "$login:x:0:$login" > /etc/group
+	echo "$login:$pass" > /tmp/tmpchpw
+	chpasswd < /tmp/tmpchpw
+	rm -f /tmp/tmpchpw
+}
+user_login=`cat /etc/passwd | grep admin`
+#user_login²»´æÔÚ»òΪ¿ÕʱºòÖ´Ðк¯ÊýgenSysFiles
+[ -n "$user_login" ] || { genSysFiles;}
+
+safe_run()
+{
+    ps_tmp=`nv get path_log`"ps.tmp"
+    ps > ${ps_tmp}
+	flag=`grep -w "$1" ${ps_tmp}`
+	if [ "-${flag}" = "-" ];then
+		$1 &
+	fi
+	rm -rf ${ps_tmp}
+}
+
+#¶¯Ì¬nvÖÿÕ
+#. $path_sh/cfgnv_init.sh
+pswan=`nv get pswan`
+ethwan=`nv get ethwan`
+wifiwan=`nv get wifiwan`
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"1"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"2"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"3"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"4"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"5"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"6"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"7"/accept_ra
+echo 0 > /proc/sys/net/ipv6/conf/$pswan"8"/accept_ra
+if [ "-$ethwan" != "-" ]; then
+    echo 0 > /proc/sys/net/ipv6/conf/$ethwan/accept_ra
+fi
+if [ "-$wifiwan" != "-" ]; then
+    echo 0 > /proc/sys/net/ipv6/conf/$wifiwan/accept_ra
+fi
+
+#°²È«ÒªÇó
+echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
+echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects
+echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects
+echo 0 > /proc/sys/net/ipv4/conf/default/accept_redirects
+echo 0 > /proc/sys/net/ipv6/conf/all/accept_redirects
+echo 0 > /proc/sys/net/ipv6/conf/default/accept_redirects
+echo 0 > /proc/sys/net/ipv4/conf/all/secure_redirects
+echo 0 > /proc/sys/net/ipv4/conf/default/secure_redirects
+
+#EC ÉèÖÃÁ¬½Ó¸ú×Ù×î´óÖµ,·Åµ½rcÀïÃæÅäÖÃ
+#echo 2000 > /proc/sys/net/nf_conntrack_max
+echo 7200 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
+
+#zte_mainctrl &
+
+#½«br_name,usblan_name´«¸øÄÚºËʵÏÖÆ½Ì¨»¯
+fast_usb=`nv get fast_usb`
+lan_enable=`nv get LanEnable`
+
+#LanEnableΪ2ʱºòûÓÐbr£¬²»ÐèҪдbr_name
+if [ "$lan_enable" != "2" ]; then
+    echo $lan_if > /proc/net/br_name
+fi
+
+echo $fast_usb > /proc/net/usb_name
+
+echo "" > /etc/resolv.conf
+
+#br0´î½¨£¬¼°ÄÚÍødhcp
+sh $path_sh/lan.sh
+
+#½«¿ìËÙת·¢¼¶±ð´«¸øÄÚºË
+fastnat_level=`nv get fastnat_level`
+echo "Info: set fastnat_level£º$fastnat_level" >> $test_log
+echo $fastnat_level > /proc/net/fastnat_level
+
+#½«²»Ö§³Ö¿ìËÙת·¢µÄЭÒé¶Ë¿ÚºÅ´«¸øÄÚºË
+nofast_port=`nv get nofast_port`
+echo "Info: set nofast_port£º$nofast_port" >> $test_log
+echo $nofast_port > /proc/net/nofast_port
+
+#SKB debug¿ª¹Ø
+skb_debug=`nv get skb_debug`
+echo "Info: set skb_debug£º$skb_debug" >> $test_log
+if [ "-$skb_debug" != "-1" ]; then
+    echo 0 > /proc/net/skb_debug_off
+fi
+
+killall -9 miniupnpd
+rm -rf $path_conf/inadyn.status
+
+#¼Ç¼½ø³Ì±»ºÎÖÖÐźÅkilledµô
+netdog -s exitsig=1
+
+#¼à¿ØÄÚºËskbÏà¹ØÐÅÏ¢µÄ×î´óÖµ
+#safe_run netmonitor
+
+#¼à¿ØÄں˵Änetlinkʼþ´æÎļþ£¬Ö§³ÖÄÚºË×Ô¶¨Òåʼþ£¬Òò»áдflash°æ±¾Ä¬ÈϹرÕ
+#safe_run event_proc