net/nat: Support isolation between multiple WAN devices by saving external ip

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2022-12-24 12:05:20 +08:00
committed by Xiang Xiao
parent 0ceee72239
commit 902a6dcad2
4 changed files with 51 additions and 53 deletions
-5
View File
@@ -77,11 +77,6 @@ Usage
Enable NAT function on a network device, on which the outbound packets
will be masqueraded.
Note that NAT is currently designed to be enabled on single device, it
may work when enabled on multiple devices, but external ports will not
be isolated between devices, so an external port used on one NAT device
will also be used by same local ip:port on another NAT device.
:return: Zero is returned if NAT function is successfully enabled on
the device; A negated errno value is returned if failed.