Merge "[Bugfix][T108][bug-view-1234] in demo, test gsw_voice_set_rtp_port fail" into GSW_V1453
diff --git a/build.sh b/build.sh
index 950ef41..735d3ff 100755
--- a/build.sh
+++ b/build.sh
@@ -578,7 +578,7 @@
 	# OPT_SEC=y
 	if [ "$SEC_SUPPORT" == "Y" ];then
 		# build mbtk lib in the first.
-		build_mbtk
+		#build_mbtk
 	        excmd make -j8 V=99 2>&1 | tee build.log
 	#	excmd make OPT_SEC=y -j1 V=99 2>&1 | tee build.log
 	else
diff --git a/config/defconfig_asr1806p301 b/config/defconfig_asr1806p301
index 7d97dde..1b33184 100755
--- a/config/defconfig_asr1806p301
+++ b/config/defconfig_asr1806p301
@@ -5799,7 +5799,7 @@
 # CONFIG_PACKAGE_libtheora is not set
 # CONFIG_PACKAGE_libtiff is not set
 # CONFIG_PACKAGE_libtins is not set
-# CONFIG_PACKAGE_libtirpc is not set
+CONFIG_PACKAGE_libtirpc=y
 # CONFIG_PACKAGE_libtorrent-rasterbar is not set
 # CONFIG_PACKAGE_libtraceevent is not set
 # CONFIG_PACKAGE_libtraceevent-extra is not set
@@ -5842,7 +5842,7 @@
 # CONFIG_PACKAGE_libwebsockets-full is not set
 # CONFIG_PACKAGE_libwebsockets-mbedtls is not set
 # CONFIG_PACKAGE_libwebsockets-openssl is not set
-# CONFIG_PACKAGE_libwrap is not set
+CONFIG_PACKAGE_libwrap=y
 # CONFIG_PACKAGE_libx264 is not set
 # CONFIG_PACKAGE_libxerces-c is not set
 # CONFIG_PACKAGE_libxerces-c-samples is not set
@@ -6991,7 +6991,9 @@
 # CONFIG_PACKAGE_remserial is not set
 # CONFIG_PACKAGE_restic-rest-server is not set
 # CONFIG_PACKAGE_rpcapd is not set
-# CONFIG_PACKAGE_rpcbind is not set
+CONFIG_PACKAGE_rpcbind=y
+CONFIG_RPCBIND_LIBWRAP=y
+CONFIG_RPCBIND_RMTCALLS=y
 # CONFIG_PACKAGE_rssileds is not set
 # CONFIG_PACKAGE_rsyslog is not set
 # CONFIG_PACKAGE_safe-search is not set
diff --git a/external/subpack/net/vsftpd/Makefile b/external/subpack/net/vsftpd/Makefile
old mode 100644
new mode 100755
index 4e75f75..571fb7a
--- a/external/subpack/net/vsftpd/Makefile
+++ b/external/subpack/net/vsftpd/Makefile
@@ -34,6 +34,7 @@
 $(call Package/vsftpd/Default)
   VARIANT:=notls
   TITLE+= (no TLS)
+  DEPENDS+=+libwrap
 endef
 
 define Package/vsftpd-tls
@@ -59,10 +60,12 @@
 endif
 
 TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h
+TARGET_LDFLAGS += -lwrap
 
 ifeq ($(BUILD_VARIANT),notls)
  define Build/Compile
 	$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
+	$(SED) 's/#undef VSF_BUILD_TCPWRAPPERS/#define VSF_BUILD_TCPWRAPPERS/' $(PKG_BUILD_DIR)/builddefs.h
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		CC="$(TARGET_CC)" \
 		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
diff --git a/external/subpack/net/vsftpd/files/vsftpd.init b/external/subpack/net/vsftpd/files/vsftpd.init
index 0f37da4..b3dee9e 100644
--- a/external/subpack/net/vsftpd/files/vsftpd.init
+++ b/external/subpack/net/vsftpd/files/vsftpd.init
@@ -8,6 +8,8 @@
 
 start_service() {
     mkdir -m 0755 -p /var/run/vsftpd
+    mkdir -m 0755 -p /media/ftp
+
     procd_open_instance
     procd_set_param command "$PROG"
     procd_set_param respawn
diff --git a/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c b/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
index d80dfbc..28f02a0 100755
--- a/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
+++ b/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
@@ -3771,11 +3771,12 @@
         if(strcmp(line_cut,white_list[i]) == 0)
         {
             ERRMSG(mbtk_check_extension_atcmd, "[%s]count %d,pass atcmd:%s",__FUNCTION__,i,line_cut);
+			free(line_cut);
             return -1;
         }
     }
     needleP =strstr(register_atcmd_buff,line_cut);
-    if(NULL != needleP)
+    if(NULL != needleP && (needleP[strlen(line_cut)] == ';' || needleP[strlen(line_cut)] == '\0'))
     {
         ERRMSG(mbtk_check_extension_atcmd, "[%s] find atcmd:%s",__FUNCTION__,line_cut);
         free(line_cut);
diff --git a/marvell/services/ota/otad.c b/marvell/services/ota/otad.c
index bb0e9f4..0fe7023 100755
--- a/marvell/services/ota/otad.c
+++ b/marvell/services/ota/otad.c
@@ -950,11 +950,12 @@
 										if (rc == -2) {

 											OTA_ERR("%s: abort by download request.\n", __func__);

 										}

-										mbtk_mtd = -1;

-										set_mtd_check_type(mbtk_mtd);

+

 										else

 									#endif

 										OTA_ERR("Fatal error: sync failed...\n");

+									mbtk_mtd = -1;

+									set_mtd_check_type(mbtk_mtd);

 									return rc;

 								}

 							OTA_DEBUG("Sync %s to %s OK...\n", pSrc->name, pDst->name);

diff --git a/mbtk/mbtk_version b/mbtk/mbtk_version
index c34fd6d..3512ced 100755
--- a/mbtk/mbtk_version
+++ b/mbtk/mbtk_version
@@ -1,3 +1,3 @@
-PATCH_INDEX=5
+PATCH_INDEX=6
 GIT_COMMIT=be5ef44399ae1d36692f7cdc06e31fe98b36a346
 PATCH_DATE=2025-03-05_16:31:55
diff --git a/package/mbtk-rootfs/Makefile b/package/mbtk-rootfs/Makefile
index 530b1fa..4cfc959 100755
--- a/package/mbtk-rootfs/Makefile
+++ b/package/mbtk-rootfs/Makefile
@@ -47,6 +47,7 @@
 
 define Build/Compile
 	@echo "Do nothing."
+	make -C $(TOPDIR)/mbtk/
 endef
 
 define Build/Clean
diff --git a/target/linux/mmp/base-files/etc/group b/target/linux/mmp/base-files/etc/group
index 02a94c6..1d9adcc 100755
--- a/target/linux/mmp/base-files/etc/group
+++ b/target/linux/mmp/base-files/etc/group
@@ -1,2 +1,4 @@
 root:x:0:
 mbtk:x:1000:
+ftp:x:1001:
+nobody:x:65534:
diff --git a/target/linux/mmp/base-files/etc/passwd b/target/linux/mmp/base-files/etc/passwd
index dcfb4a9..c1819eb 100755
--- a/target/linux/mmp/base-files/etc/passwd
+++ b/target/linux/mmp/base-files/etc/passwd
@@ -1,2 +1,4 @@
 root:x:0:0:root:/root:/bin/ash
 mbtk:x:1000:1000:mbtk:/home/mbtk:/bin/ash
+ftp:x:1001:1001:FTP User:/media/ftp:/bin/false
+nobody:x:65534:65534:nobody:/dev/null:/bin/false