mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/nat: fix missed nat_unlock
If call nat_enable twice, there will be a miss "nat_unlock". Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
This commit is contained in:
parent
db572d860b
commit
ef67e94613
1 changed files with 1 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ int nat_enable(FAR struct net_driver_s *dev)
|
|||
if (IFF_IS_NAT(dev->d_flags))
|
||||
{
|
||||
nwarn("WARNING: NAT was already enabled for %s!\n", dev->d_ifname);
|
||||
nat_unlock();
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue