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
|
else
|
||||||
{
|
{
|
||||||
this->mutex->lock(this->mutex);
|
this->mutex->lock(this->mutex);
|
||||||
entry = this->active->remove(this->active, id);
|
|
||||||
if (entry)
|
|
||||||
{
|
|
||||||
entry_destroy(entry);
|
|
||||||
}
|
|
||||||
entry = this->checking->remove(this->checking, id);
|
entry = this->checking->remove(this->checking, id);
|
||||||
this->mutex->unlock(this->mutex);
|
this->mutex->unlock(this->mutex);
|
||||||
if (entry)
|
if (entry)
|
||||||
@@ -150,6 +145,16 @@ METHOD(listener_t, ike_updown, bool,
|
|||||||
"keeping new IKE_SA", id);
|
"keeping new IKE_SA", id);
|
||||||
entry_destroy(entry);
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user