cnat: fix spinlock
Type: fix Change-Id: Id6406702061ada54e51ebcf5c367328605de2b6b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
This commit is contained in:
committed by
Beno�t Ganne
parent
e9d7b0982d
commit
8afa5d3ccd
@@ -122,7 +122,10 @@ cnat_allocate_port (u16 * port, ip_protocol_t iproto)
|
||||
if (PREDICT_FALSE (*port >= UINT16_MAX))
|
||||
*port = clib_bitmap_next_clear (ca->bmap, MIN_SRC_PORT);
|
||||
if (PREDICT_FALSE (*port >= UINT16_MAX))
|
||||
return -1;
|
||||
{
|
||||
clib_spinlock_unlock (&ca->lock);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
clib_bitmap_set_no_check (ca->bmap, *port, 1);
|
||||
*port = clib_host_to_net_u16 (*port);
|
||||
|
||||
Reference in New Issue
Block a user