From 35fe20da8457840162acde48015579dc60646442 Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Tue, 12 Dec 2023 00:55:58 +1100 Subject: [PATCH] change(lwip): Remove 'experimental' from NAPT in kconfig, update lwIP doc --- components/lwip/Kconfig | 4 ++-- docs/en/api-guides/lwip.rst | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 2a1c742f66..9a8752efee 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -248,14 +248,14 @@ menu "LWIP" Enabling this option allows packets forwarding across multiple interfaces. config LWIP_IPV4_NAPT - bool "Enable NAT (new/experimental)" + bool "Enable NAT" depends on LWIP_IP_FORWARD default n help Enabling this option allows Network Address and Port Translation. config LWIP_IPV4_NAPT_PORTMAP - bool "Enable NAT Port Mapping (new/experimental)" + bool "Enable NAT Port Mapping" depends on LWIP_IPV4_NAPT default y help diff --git a/docs/en/api-guides/lwip.rst b/docs/en/api-guides/lwip.rst index 0691d389bc..907e48a4f9 100644 --- a/docs/en/api-guides/lwip.rst +++ b/docs/en/api-guides/lwip.rst @@ -419,6 +419,14 @@ IP Layer Features - IPV4-mapped IPV6 addresses are supported +NAPT and Port Forwarding +++++++++++++++++++++++++ + +IPV4 network address port translation (NAPT) and port forwarding are supported. However, the enabling of NAPT is limited to a single interface. + +- To use NAPT for forwarding packets between two interfaces, it needs to be enabled on the interface connecting to the target network. For example, to enable internet access for Ethernet traffic through the WiFi interface, NAPT must be enabled on the Ethernet interface. +- Usage of NAPT is demonstrated in :example:`network/vlan_support`. + .. _lwip-custom-hooks: Customized lwIP Hooks