Skip to content

Commit

Permalink
Merge branch 'lwip/napt_portmap_seperation' into 'master'
Browse files Browse the repository at this point in the history
lwip/napt: Added option to enable or disable Port mapping in NAPT.

See merge request espressif/esp-idf!21643
  • Loading branch information
espressif-abhikroy committed Sep 20, 2023
2 parents 5e4755a + 4940cfa commit d057bac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/lwip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/lwip/lwip
7 changes: 7 additions & 0 deletions components/lwip/port/include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d057bac

Please sign in to comment.