diff --git a/src/script/traffic_separation b/src/script/traffic_separation
index 22e709f9db4cefa0ea75bba3c1e4c02aad791da1..15363d943a33488bdfd969b1cf8e46aa6a362a1e 100755
--- a/src/script/traffic_separation
+++ b/src/script/traffic_separation
@@ -329,6 +329,14 @@ EOF
 			local tunnel_if=0
 			config_foreach find_vid_interface interface $vid
 
+			# support tagging for all map_port
+			for port in $map_ports ; do
+				uci -q get network.${name}.ports | grep -q "${port}" && {
+					uci -q del_list network.${name}.ports="${port}"
+				}
+				uci -q add_list network.${name}.ports="${port}${tag}"
+			done
+
 			# tag devices assigned to netif_device
 			[ -n "$netif_device" ] && {
 				uci -q del_list network.${name}.ports="${netif_device}:*"
@@ -338,14 +346,6 @@ EOF
 				return
 			}
 
-			# support tagging for all map_port
-			for port in $map_ports ; do
-				uci -q get network.${name}.ports | grep -q "${port}" && {
-					uci -q del_list network.${name}.ports="${port}"
-				}
-				uci -q add_list network.${name}.ports="${port}${tag}"
-			done
-
 			# non-map ports add PVID egress untagged
 			[ "${vid}" = "${PRIMARY_VID}" ] && {
 				for port in $(uci -q get network.${br_dev}.ports) ; do