diff --git a/app/nathelper/linux/host_helper.c b/app/nathelper/linux/host_helper.c
index 865f8f1..239777d 100755
--- a/app/nathelper/linux/host_helper.c
+++ b/app/nathelper/linux/host_helper.c
@@ -759,11 +759,17 @@
             devmac = (uint8_t *)nat_dev->dev_addr;
         }
         /* get vid */
+#if 0
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
         vid = vlan_dev_vlan_id(nat_dev);
 #else
         vid = 0;
 #endif
+#endif
+		if(is_wan)
+			vid = nat_wan_vid;
+		else
+			vid = nat_lan_vid;
 #ifdef CONFIG_IPV6_HWACCEL
         ipv6 = 1;
         if (is_wan)
@@ -860,12 +866,12 @@
 				/*wan port*/
 				HNAT_PRINTK("wan port vid:%d\n", tmp_vid);
 				nat_wan_vid = tmp_vid;
-				snprintf(nat_wan_dev_list, IFNAMSIZ, "eth0.%d", tmp_vid);
+				snprintf(nat_wan_dev_list, IFNAMSIZ, "eth0.%d eth0", tmp_vid);
 			} else {
 				/*lan port*/
 				HNAT_PRINTK("lan port vid:%d\n", tmp_vid);
 				nat_lan_vid = tmp_vid;
-				snprintf(nat_lan_dev_list, IFNAMSIZ, "eth0.%d", tmp_vid);
+				snprintf(nat_lan_dev_list, IFNAMSIZ, "eth0.%d eth1", tmp_vid);
 			}
 		}
 	}
diff --git a/app/nathelper/linux/napt_helper.c b/app/nathelper/linux/napt_helper.c
index 436972f..e9ae59c 100755
--- a/app/nathelper/linux/napt_helper.c
+++ b/app/nathelper/linux/napt_helper.c
@@ -28,6 +28,7 @@
 #include <linux/if_arp.h>
 #include <linux/if_vlan.h>
 #include <linux/inetdevice.h>
+#include <linux/string.h>
 #include <net/netfilter/nf_conntrack_acct.h>
 #include <net/netfilter/nf_conntrack_helper.h>
 #include <net/netfilter/nf_conntrack.h>
@@ -238,9 +239,8 @@
 	dev = ip_dev_find(&init_net, dst_ip);
 	if(dev) {
 		if(dev->type == ARPHRD_ETHER) {
-			if (is_vlan_dev(dev)) {
+			if(strstr(dev->name, "eth0"))
 				return 1;
-			}
 		}
 	}
 
diff --git a/app/nathelper/linux/napt_helper.h b/app/nathelper/linux/napt_helper.h
index b5aa840..4cd21a9 100755
--- a/app/nathelper/linux/napt_helper.h
+++ b/app/nathelper/linux/napt_helper.h
@@ -87,12 +87,5 @@
 
 #endif
 
-//#define HNAT_DEBUG 1
-
-#ifdef HNAT_DEBUG
-#define HNAT_PRINTK(x...) aos_printk(x)
-#else
-#define HNAT_PRINTK(x...)
-#endif
 
 #endif
diff --git a/app/nathelper/linux/napt_procfs.c b/app/nathelper/linux/napt_procfs.c
index 9507e9e..b6b1729 100755
--- a/app/nathelper/linux/napt_procfs.c
+++ b/app/nathelper/linux/napt_procfs.c
@@ -65,7 +65,7 @@
 unsigned char nf_athrs17_hnat_ppp_peer_mac[ETH_ALEN] = {0};
 unsigned char nf_athrs17_hnat_wan_mac[ETH_ALEN] = {0};
 extern int nf_athrs17_hnat_sync_counter_en;
-
+extern char  hnat_log_en;
 /* for IPv6 over PPPoE (only for S17c)*/
 int nf_athrs17_hnat_ppp_id2 = 0;
 unsigned char nf_athrs17_hnat_ppp_peer_mac2[ETH_ALEN] = {0};
@@ -776,6 +776,38 @@
 	return count;
 }
 
+static ssize_t napt_log_en_get(struct device *dev,
+		  struct device_attribute *attr,
+		  char *buf)
+{
+	ssize_t count;
+	a_uint32_t num;
+
+	num = (a_uint32_t)hnat_log_en;
+
+	count = snprintf(buf, (ssize_t)PAGE_SIZE, "%u", num);
+	return count;
+}
+
+static ssize_t napt_log_en_set(struct device *dev,
+		  struct device_attribute *attr,
+		  const char *buf, size_t count)
+{
+	char num_buf[12];
+	a_uint32_t num;
+
+
+	if (count >= sizeof(num_buf)) return 0;
+	memcpy(num_buf, buf, count);
+	num_buf[count] = '\0';
+	sscanf(num_buf, "%u", &num);
+
+	hnat_log_en = num;
+
+	return count;
+}
+
+
 
 struct kobject *napt_sys = NULL;
 static const struct device_attribute napt_hnat_attr =
@@ -800,6 +832,8 @@
 	__ATTR(peer_mac2, S_IWUGO | S_IRUGO, napt_peer_mac2_get, napt_peer_mac2_set);
 static const struct device_attribute napt_sync_counter_en_attr =
 	__ATTR(sync_counter_en, S_IWUGO | S_IRUGO, napt_sync_counter_en_get, napt_sync_counter_en_set);
+static const struct device_attribute napt_log_en_attr =
+	__ATTR(log_en, S_IWUGO | S_IRUGO, napt_log_en_get, napt_log_en_set);
 
 
 
@@ -870,8 +904,15 @@
 		printk("Failed to register sync counter en SysFS file\n");
 		goto CLEANUP_11;
 	}
+	ret = sysfs_create_file(napt_sys, &napt_log_en_attr.attr);
+	if (ret) {
+		printk("Failed to register log en SysFS file\n");
+		goto CLEANUP_12;
+	}
 	return 0;
 
+CLEANUP_12:
+	sysfs_remove_file(napt_sys, &napt_log_en_attr.attr);
 CLEANUP_11:
 	sysfs_remove_file(napt_sys, &napt_sync_counter_en_attr.attr);
 CLEANUP_10:
@@ -902,6 +943,8 @@
 {
 	printk("napt procfs exit\n");
 
+	sysfs_remove_file(napt_sys, &napt_log_en_attr.attr);
+	sysfs_remove_file(napt_sys, &napt_sync_counter_en_attr.attr);
 	sysfs_remove_file(napt_sys, &napt_ppp_peer_mac2_attr.attr);
 	sysfs_remove_file(napt_sys, &napt_ppp_id2_attr.attr);
 	sysfs_remove_file(napt_sys, &napt_wan_mac_attr.attr);
diff --git a/app/nathelper/linux/nat_helper.c b/app/nathelper/linux/nat_helper.c
index 2a6cfb5..6da6c87 100755
--- a/app/nathelper/linux/nat_helper.c
+++ b/app/nathelper/linux/nat_helper.c
@@ -18,9 +18,27 @@
 #else
 #include <linux/autoconf.h>
 #endif
+#include <linux/string.h>
+
 
 #include "nat_helper.h"
 
+char hnat_log_en = 0;
+
+void hnat_log_msg(int level, char *string, ...)
+{
+
+	va_list   ptr;
+	char buffer[NAT_LOG_MAX_SIZE];
+
+	if(!hnat_log_en)
+		return;
+	memset(buffer, 0, sizeof(buffer));
+	va_start(ptr,string);
+	vsprintf(buffer , string, ptr);
+	va_end(ptr);
+	aos_printk("%s\n", buffer);
+}
 
 
 sw_error_t
diff --git a/app/nathelper/linux/nat_helper.h b/app/nathelper/linux/nat_helper.h
index 53d4a5b..3eb04a7 100755
--- a/app/nathelper/linux/nat_helper.h
+++ b/app/nathelper/linux/nat_helper.h
@@ -30,23 +30,17 @@
 void nat_helper_bg_task_init(void);
 void nat_helper_bg_task_exit(void);
 
-
-//#define HNAT_DEBUG 1
-
-#ifdef HNAT_DEBUG
-#define HNAT_PRINTK(x...) aos_printk(x)
-#else
-#define HNAT_PRINTK(x...)
-#endif
-
-//#define HNAT_ERR_DEBUG 1
-
-#ifdef HNAT_ERR_DEBUG
-#define HNAT_ERR_PRINTK(x...) aos_printk(x)
-#else
-#define HNAT_ERR_PRINTK(x...)
-#endif
-
+void hnat_log_msg(int level, char *string, ...);
+#define NAT_LOG_MAX_SIZE 1024
+enum {
+	HNAT_LOG_LEVEL_DEBUG = 0,
+	HNAT_LOG_LEVEL_INFO,
+	HNAT_LOG_LEVEL_ERR
+};
+#define HNAT_PRINTK(arg...)  \
+			hnat_log_msg(HNAT_LOG_LEVEL_DEBUG, arg)
+#define HNAT_ERR_PRINTK(arg...)  \
+			hnat_log_msg(HNAT_LOG_LEVEL_ERR, arg)
 
 
 #endif
