mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user