Merge "[Feature][T106]version update to T106-MXX-SIHAI-P56U11.AP.19.04_CAP.19.04" into SIHA_SDK5.1_BASE
diff --git a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
index 4a4ae9b..2533625 100755
--- a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
+++ b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
@@ -874,17 +874,26 @@
(actinfo->act_info.ip46flag & V4_VALID))
{
char nat_enable[4] = {0};
-
+ /*add lynq nv config support & merge changes for sihai@cz.li on 2024/10/11 start*/
+ int rndis_ip_map = !system("cat /sys/class/lynq_nv_cfg/cdev_lynq_nv_cfg/rndis_ip_map | grep 1");
system_cmd_ex("iptables -P INPUT ACCEPT");
system_cmd_ex("iptables -P OUTPUT ACCEPT");
system_cmd_ex("iptables -P FORWARD ACCEPT");
- system_cmd_ex("iptables -t nat -F");
+ if (rndis_ip_map == 0)
+ system_cmd_ex("iptables -t nat -F");
system_cmd_ex("iptables -t nat -X port_forward");
system_cmd_ex("iptables -t nat -X DMZ");
system_cmd_ex("iptables -t nat -X port_mapping");
system_cmd_ex("iptables -t nat -N port_forward");
system_cmd_ex("iptables -t nat -N DMZ");
system_cmd_ex("iptables -t nat -N port_mapping");
+ if (rndis_ip_map == 1)
+ {
+ system_cmd_ex("iptables -t nat -D PREROUTING -j port_forward");
+ system_cmd_ex("iptables -t nat -D PREROUTING -j DMZ");
+ system_cmd_ex("iptables -t nat -D PREROUTING -j port_mapping");
+ }
+ /*add lynq nv config support & merge changes for sihai@cz.li on 2024/10/11 end*/
system_cmd_ex("iptables -t nat -I PREROUTING 1 -j port_forward");
system_cmd_ex("iptables -t nat -I PREROUTING 1 -j DMZ");
system_cmd_ex("iptables -t nat -I PREROUTING 1 -j port_mapping");
diff --git a/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h b/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
index 20e98c2..2f2fd41 100755
--- a/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
+++ b/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
@@ -26,35 +26,35 @@
static const char lynq_nv_cfg_version[] = "T106_CN_20240627";
static const char lynq_nv_cfg_value[] = {
- '\x55', '\xaa', '\x09', '\x00', '\x40', '\x00', '\x00', '\x00', '\xaa', '\x55', '\x09', '\x00', '\x01', '\x00', '\x15', '\xc0'
+ '\x55', '\xaa', '\x09', '\x00', '\x00', '\x00', '\x80', '\x80', '\xaa', '\x55', '\x09', '\x00', '\x01', '\x00', '\x60', '\x60'
};
static const char lynq_nv_cfg_bitmap[] = {
'\xc0', '\x80', '\x80', '\x80'
};
static const char oem_nv_cfg_bitmap[] = {
- '\x80', '\x80', '\x80', '\x80'
+ '\x00', '\x00', '\x80', '\x80'
};
static const char lynq_nv_cfg_publickey[] = {
- '\xe7', '\x09', '\xa3', '\x94', '\x19', '\x39', '\x46', '\x55', '\x59', '\x0f', '\x1b', '\x81', '\xa3', '\x61', '\x45', '\x3b',
- '\x74', '\x07', '\x9a', '\x21', '\x4a', '\xb3', '\x63', '\x1b', '\x96', '\x32', '\xf8', '\xbb', '\xc2', '\x4e', '\xf1', '\xa6',
- '\x0c', '\x77', '\x43', '\xe0', '\x45', '\x15', '\xb2', '\x1c', '\x2d', '\xf1', '\xf9', '\x22', '\xdb', '\xbc', '\xfb', '\x5c',
- '\xef', '\x3d', '\x4b', '\xc3', '\x91', '\xfa', '\x1f', '\xe8', '\x36', '\xc9', '\xd8', '\xcf', '\x79', '\xf3', '\xe8', '\xbe',
- '\x30', '\x7e', '\x11', '\x8b', '\x7f', '\xc9', '\x22', '\xfb', '\x3c', '\x77', '\x7a', '\xa2', '\xd8', '\x23', '\x60', '\xc5',
- '\x79', '\x97', '\xbf', '\x8d', '\x21', '\xee', '\x87', '\xd3', '\xdf', '\x2c', '\xc3', '\x34', '\xd8', '\xa2', '\x3d', '\xca',
- '\x40', '\xf3', '\x83', '\x23', '\x28', '\x82', '\xb3', '\x67', '\xf8', '\x34', '\xdd', '\x9c', '\x40', '\x35', '\x61', '\x85',
- '\x89', '\xae', '\xc2', '\x26', '\xfb', '\xbd', '\x77', '\xe6', '\xfe', '\x81', '\x39', '\xc3', '\xd1', '\x7b', '\xe0', '\x39',
+ '\xbf', '\x87', '\xd6', '\xc8', '\x78', '\x7e', '\x64', '\x15', '\x47', '\x46', '\xa2', '\x31', '\x86', '\x8a', '\x9c', '\x3b',
+ '\x47', '\x55', '\x9f', '\x2f', '\xa1', '\xba', '\xdb', '\x6a', '\x5b', '\xf0', '\xc6', '\x4f', '\xc5', '\x39', '\xfd', '\xb2',
+ '\x7e', '\xb7', '\xf5', '\x23', '\xaf', '\x85', '\x7d', '\x19', '\xd0', '\x96', '\x4d', '\x4a', '\x91', '\x38', '\xbf', '\xb1',
+ '\x85', '\x44', '\x93', '\xae', '\x79', '\xc9', '\xa5', '\xde', '\xa8', '\x71', '\x62', '\x0e', '\xa1', '\xc1', '\x89', '\xc2',
+ '\x64', '\xfe', '\x1b', '\x0c', '\x26', '\x71', '\xf2', '\x93', '\x85', '\x0f', '\x4b', '\x48', '\x21', '\xa1', '\x51', '\x46',
+ '\x01', '\x01', '\xa2', '\xc1', '\x71', '\xeb', '\x52', '\x73', '\x48', '\x73', '\xf9', '\x32', '\xfb', '\x7f', '\x81', '\xbb',
+ '\xe8', '\x5b', '\x05', '\x96', '\x39', '\x24', '\xa0', '\x45', '\x9e', '\xde', '\x8f', '\x44', '\x07', '\xff', '\x3d', '\xad',
+ '\xa8', '\xa0', '\x2f', '\xc5', '\x12', '\x7e', '\x5d', '\x71', '\x4c', '\x65', '\x29', '\x65', '\x2b', '\x55', '\x36', '\xa9',
'\x01', '\x00', '\x01', '\x00'
};
static const char lynq_nv_cfg_sign[] = {
- '\x79', '\xc0', '\x04', '\x03', '\xb3', '\x6b', '\x18', '\x12', '\x1d', '\x09', '\xf7', '\x7f', '\xb0', '\x56', '\x86', '\x9c',
- '\x26', '\x21', '\x75', '\xbd', '\x0e', '\x93', '\xe1', '\x3d', '\xae', '\x35', '\x68', '\x6f', '\xfc', '\x0a', '\x0a', '\x40',
- '\x48', '\x40', '\xf3', '\x95', '\x7c', '\x26', '\xb8', '\xd7', '\xc3', '\xd0', '\xc9', '\x99', '\x35', '\x0f', '\x0f', '\x36',
- '\x77', '\xe4', '\x98', '\x41', '\x25', '\xa1', '\xff', '\xbd', '\x4c', '\xad', '\x41', '\xe3', '\x9c', '\x73', '\x92', '\x66',
- '\xaa', '\xad', '\x3e', '\x17', '\x78', '\xaa', '\x86', '\x78', '\x61', '\x56', '\x63', '\x2a', '\xa4', '\xc0', '\x49', '\x28',
- '\x25', '\x3a', '\xb5', '\x53', '\x23', '\xe4', '\x2c', '\x79', '\x69', '\x6a', '\x45', '\x86', '\xbc', '\x5c', '\x08', '\x57',
- '\xa4', '\xc6', '\x7f', '\xf5', '\x0e', '\x32', '\xf5', '\x46', '\x9a', '\xa1', '\xef', '\x07', '\xc3', '\x5d', '\x09', '\x75',
- '\xc0', '\x87', '\x8d', '\x1d', '\x0d', '\x0a', '\x07', '\xca', '\xb2', '\xb8', '\xe8', '\x75', '\x9d', '\x37', '\xcf', '\xeb'
+ '\xfe', '\xad', '\xcd', '\x78', '\x0a', '\x86', '\x26', '\xcf', '\xb3', '\x3d', '\x4f', '\x22', '\xe5', '\x4f', '\x59', '\x15',
+ '\xa7', '\x5f', '\x8b', '\x65', '\x28', '\x4a', '\x5e', '\x3f', '\xec', '\x57', '\xc2', '\x04', '\xa5', '\xeb', '\x2e', '\x90',
+ '\xa4', '\x15', '\xa4', '\xef', '\xe4', '\x22', '\x41', '\xd5', '\x04', '\x41', '\x87', '\x12', '\x89', '\x32', '\xc5', '\x17',
+ '\xe5', '\xff', '\x44', '\x0b', '\x81', '\x5a', '\x03', '\xf8', '\xb3', '\x14', '\x06', '\xa4', '\xc8', '\x74', '\x8d', '\x32',
+ '\xe6', '\xf9', '\xe2', '\x92', '\xe6', '\x71', '\x2c', '\xa2', '\x01', '\xf9', '\x40', '\xb1', '\x18', '\xa1', '\xf8', '\xa5',
+ '\xf1', '\x4e', '\xbd', '\xd6', '\x69', '\x03', '\x3a', '\xe3', '\x0b', '\x00', '\xb7', '\x1f', '\x63', '\x5f', '\x16', '\x42',
+ '\x6d', '\x47', '\x06', '\x5a', '\xa9', '\xa6', '\xfd', '\x58', '\x7c', '\xc6', '\xa8', '\x19', '\x11', '\xef', '\xa9', '\x20',
+ '\x49', '\x27', '\x04', '\xe4', '\x5a', '\xb5', '\xe6', '\x9e', '\xf1', '\x71', '\xbf', '\x77', '\x93', '\x20', '\x51', '\x47'
};
#endif
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/internet.sh b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/internet.sh
index a674513..0414ee5 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/internet.sh
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/internet.sh
@@ -6,8 +6,8 @@
#
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
+#echo "Info: internet.sh start" > $test_log //SIHAI don`t need this log
+#echo "Info: `date +%m-%d_%H:%M:%S`" >> $test_log //SIHAI don`t need this log
echo 7200 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
@@ -25,14 +25,14 @@
#½«¿ìËÙת·¢¼¶±ð´«¸øÄÚºË
fastnat_level=`nv get fastnat_level`
-echo "Info: set fastnat_level£º$fastnat_level" >> $test_log
+#echo "Info: set fastnat_level£º$fastnat_level" >> $test_log //SIHAI don`t need this log
echo $fastnat_level > /proc/net/fastnat_level
fastbr_level=`nv get fastbr_level`
-echo "Info: set fastbr_level: $fastbr_level" >> $test_log
+#echo "Info: set fastbr_level: $fastbr_level" >> $test_log //SIHAI don`t need this log
echo $fastbr_level > /proc/net/fastbr_level
#½«²»Ö§³Ö¿ìËÙת·¢µÄÐÒé¶Ë¿ÚºÅ´«¸øÄÚºË
nofast_port=`nv get nofast_port`
-echo "Info: set nofast_port£º$nofast_port" >> $test_log
+#echo "Info: set nofast_port£º$nofast_port" >> $test_log //SIHAI don`t need this log
echo $nofast_port > /proc/net/nofast_port
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/lan.sh b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/lan.sh
index 2d6fa29..8d90fdf 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/lan.sh
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/lan.sh
@@ -14,29 +14,30 @@
echo "ifconfig $br_name start...................."
ifconfig $br_name down
brctl delbr $br_name
- brctl addbr $br_name 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: brctl addbr $br_name failed." >> $test_log
- fi
- brctl setfd $br_name 0.1 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: brctl setfd $br_name 0.1 failed." >> $test_log
- fi
- ifconfig lo up 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: ifconfig lo up failed." >> $test_log
- fi
- ifconfig $br_name up 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: ifconfig $br_name up failed." >> $test_log
- fi
-
+ brctl addbr $br_name
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
+ #if [ $? -ne 0 ];then
+ #echo "Error: brctl addbr $br_name failed." >> $test_log
+ #fi
+ brctl setfd $br_name 0.1
+ #if [ $? -ne 0 ];then
+ #echo "Error: brctl setfd $br_name 0.1 failed." >> $test_log
+ #fi
+ ifconfig lo up
+ #if [ $? -ne 0 ];then
+ #echo "Error: ifconfig lo up failed." >> $test_log
+ #fi
+ ifconfig $br_name up
+ #if [ $? -ne 0 ];then
+ #echo "Error: ifconfig $br_name up failed." >> $test_log
+ #fi
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
#´ò¿ªÍøÇŵØÖ·¸Ä±ä֪ͨµÄ¿ª¹Ø
echo 1 > /proc/sys/net/ipv4/conf/$br_name/arp_notify
prj=`cat /sys/gmac/gmacconfig/type`
if [ "$prj" == "cpe" ]; then
- ifconfig eth0 up 2>>$test_log
- brctl addif $br_name eth0 2>>$test_log
+ ifconfig eth0 up
+ brctl addif $br_name eth0
fi
br_node=`nv get br_node_cap`
@@ -47,10 +48,12 @@
do
ifconfig $device up
- brctl addif $br_name $device 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: brctl addif $br_name $device failed." >> $test_log
- fi
+ brctl addif $br_name $device
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
+ #if [ $? -ne 0 ];then
+ #echo "Error: brctl addif $br_name $device failed." >> $test_log
+ #fi
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
done
IFS=$IFS_OLD
}
@@ -59,18 +62,22 @@
{
ip=`nv get lan_ipaddr_cap`
nm=`nv get lan_netmask_cap`
- ifconfig $lan_if_cap $ip netmask $nm 2>>$test_log
- if [ $? -ne 0 ];then
- echo "Error: ifconfig $lan_if_cap $ip netmask $nm failed." >> $test_log
- fi
+ ifconfig $lan_if_cap $ip netmask $nm
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
+ #if [ $? -ne 0 ];then
+ #echo "Error: ifconfig $lan_if_cap $ip netmask $nm failed." >> $test_log
+ #fi
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
webv6_enable=`nv get webv6_enable`
ipv6=`nv get lan_ipv6addr_cap`
if [ "x$webv6_enable" == "x1" ]; then
ifconfig $lan_if_cap $ipv6/64
- if [ $? -ne 0 ];then
- echo "Error: ifconfig $lan_if_cap $ipv6 failed." >> $test_log
- fi
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
+ #if [ $? -ne 0 ];then
+ #echo "Error: ifconfig $lan_if_cap $ipv6 failed." >> $test_log
+ #fi
+ #add Notes for SIHAI don`t need this log by cz.li on 2024/10/18
fi
}
@@ -81,7 +88,7 @@
exit 0
fi
- echo "Info: lan.sh start" >> $test_log
+ #echo "Info: lan.sh start" >> $test_log //SIHAI don`t need this log
if [ "x$lan_enable" == "x1" ]; then
br_set
@@ -100,7 +107,7 @@
dhcp=`nv get dhcpEnabled`
if [ "$dhcp" == "1" ]; then
- echo "Info: config-udhcpd.sh lan -r 1 start" >> $test_log
+ #echo "Info: config-udhcpd.sh lan -r 1 start" >> $test_log //SIHAI don`t need this log
. $path_sh/config-udhcpd.sh "lan" -r 1
fi
fi
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/user-config-udhcpd.sh b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/user-config-udhcpd.sh
index dd03b71..8ea91a9 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/user-config-udhcpd.sh
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/user-config-udhcpd.sh
@@ -2,7 +2,7 @@
path_sh=`nv get path_sh`
. $path_sh/global.sh
-echo "Info: user-config-udhcpd.sh start" >> $test_log
+#echo "Info: user-config-udhcpd.sh start" >> $test_log //SIHAI don`t need this log
lan_enable=`nv get LanEnable`
if [ "-$lan_enable" == "-0" ]; then
@@ -56,10 +56,10 @@
sh $path_sh/config-udhcpd.sh "lan" -i $lan_if
sh $path_sh/config-udhcpd.sh "lan" -m $mask
sh $path_sh/config-udhcpd.sh "lan" -d $dns
-echo "Info: config-udhcpd.sh lan -d $dns" >> $test_log
+#echo "Info: config-udhcpd.sh lan -d $dns" >> $test_log //SIHAI don`t need this log
if [ "-$gw" != "-" ]; then
sh $path_sh/config-udhcpd.sh "lan" -g $gw
- echo "Info: config-udhcpd.sh lan -g $gw" >> $test_log
+ #echo "Info: config-udhcpd.sh lan -g $gw" >> $test_log //SIHAI don`t need this log
fi
if [ "-$lease" != "-" ]; then
sh $path_sh/config-udhcpd.sh "lan" -t $lease