mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
napt: Fix IP forwarding when forward netif enable NAPT
* Fix communication between different netifs fails if NAPT is enabled * Fixes IDF-4896
This commit is contained in:
+5
-2
@@ -332,8 +332,11 @@ ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp)
|
||||
|
||||
#if ESP_LWIP
|
||||
#if IP_NAPT
|
||||
if (ip_napt_forward(p, iphdr, inp, netif) != ERR_OK)
|
||||
return;
|
||||
/* If the output netif uses NAPT, we will not perform NAPT forwarding (because NAPT netif will not search the NAPT table on ip4_input) */
|
||||
if (!netif->napt) {
|
||||
if (ip_napt_forward(p, iphdr, inp, netif) != ERR_OK)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif /* ESP_LWIP */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user