Browse Source

Merge branch 'lwip/napt_portmap_seperation' into 'master'

lwip/napt: Added option to enable or disable Port mapping in NAPT.

See merge request espressif/esp-idf!21643
Abhik Roy 2 years ago
parent
commit
d057bacbd3
3 changed files with 15 additions and 1 deletions
  1. 7 0
      components/lwip/Kconfig
  2. 1 1
      components/lwip/lwip
  3. 7 0
      components/lwip/port/include/lwipopts.h

+ 7 - 0
components/lwip/Kconfig

@@ -227,6 +227,13 @@ menu "LWIP"
         help
             Enabling this option allows Network Address and Port Translation.
 
+    config LWIP_IPV4_NAPT_PORTMAP
+        bool "Enable NAT Port Mapping (new/experimental)"
+        depends on LWIP_IPV4_NAPT
+        default y
+        help
+            Enabling this option allows Port Forwarding or Port mapping.
+
     config LWIP_STATS
         bool "Enable LWIP statistics"
         default n

+ 1 - 1
components/lwip/lwip

@@ -1 +1 @@
-Subproject commit 7896c6cad020d17a986f7e850f603e084e319328
+Subproject commit 90009cc2b0b487ab12688778f5fffc27e9b2b8c3

+ 7 - 0
components/lwip/port/include/lwipopts.h

@@ -216,6 +216,13 @@ extern "C" {
  */
 #ifdef CONFIG_LWIP_IPV4_NAPT
 #define IP_NAPT                         1
+
+#ifdef CONFIG_LWIP_IPV4_NAPT_PORTMAP
+#define IP_NAPT_PORTMAP                 1
+#else
+#define IP_NAPT_PORTMAP                 0
+#endif
+
 #else
 #define IP_NAPT                         0
 #endif