net/nat: Remove unnecessary logic in inbound logic
Finish https://github.com/apache/nuttx/pull/12116#discussion_r1560880897 Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
parent
17584eaa4f
commit
932c41debb
@ -744,14 +744,7 @@ void ipv4_nat_inbound(FAR struct net_driver_s *dev,
|
||||
if (IFF_IS_NAT(dev->d_flags) &&
|
||||
net_ipv4addr_hdrcmp(ipv4->destipaddr, &dev->d_ipaddr))
|
||||
{
|
||||
FAR ipv4_nat_entry_t *entry =
|
||||
ipv4_nat_inbound_internal(ipv4, NAT_MANIP_DST);
|
||||
if (!entry)
|
||||
{
|
||||
/* Inbound without entry is OK (e.g. towards NuttX itself), skip. */
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -634,14 +634,7 @@ void ipv6_nat_inbound(FAR struct net_driver_s *dev,
|
||||
if (IFF_IS_NAT(dev->d_flags) &&
|
||||
NETDEV_IS_MY_V6ADDR(dev, ipv6->destipaddr))
|
||||
{
|
||||
FAR ipv6_nat_entry_t *entry =
|
||||
ipv6_nat_inbound_internal(ipv6, NAT_MANIP_DST);
|
||||
if (!entry)
|
||||
{
|
||||
/* Inbound without entry is OK (e.g. towards NuttX itself), skip. */
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user