Remove entry from active duplicate list only if it was not in checking
This commit is contained in:
@@ -137,11 +137,6 @@ METHOD(listener_t, ike_updown, bool,
|
||||
else
|
||||
{
|
||||
this->mutex->lock(this->mutex);
|
||||
entry = this->active->remove(this->active, id);
|
||||
if (entry)
|
||||
{
|
||||
entry_destroy(entry);
|
||||
}
|
||||
entry = this->checking->remove(this->checking, id);
|
||||
this->mutex->unlock(this->mutex);
|
||||
if (entry)
|
||||
@@ -150,6 +145,16 @@ METHOD(listener_t, ike_updown, bool,
|
||||
"keeping new IKE_SA", id);
|
||||
entry_destroy(entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->mutex->lock(this->mutex);
|
||||
entry = this->active->remove(this->active, id);
|
||||
this->mutex->unlock(this->mutex);
|
||||
if (entry)
|
||||
{
|
||||
entry_destroy(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user