Skip to content

Commit

Permalink
feat: Added option to enable or disable Port mapping in NAPT
Browse files Browse the repository at this point in the history
  • Loading branch information
espressif-abhikroy committed Sep 18, 2023
1 parent 3b748a6 commit 4940cfa
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 4940cfa

Please sign in to comment.