mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/nat: Unlock on outbound NAT entry creation failure.
Release nat_lock before returning -ENOENT from the IPv4 and IPv6 outbound NAT paths when NAT entry creation fails. Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
This commit is contained in:
parent
78e3f17b9e
commit
1e6c751db7
2 changed files with 2 additions and 0 deletions
|
|
@ -795,6 +795,7 @@ int ipv4_nat_outbound(FAR struct net_driver_s *dev,
|
|||
{
|
||||
/* Outbound entry creation failed, should have entry. */
|
||||
|
||||
nat_unlock();
|
||||
return -ENOENT;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -683,6 +683,7 @@ int ipv6_nat_outbound(FAR struct net_driver_s *dev,
|
|||
{
|
||||
/* Outbound entry creation failed, should have entry. */
|
||||
|
||||
nat_unlock();
|
||||
return -ENOENT;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue