ikev1: Fix config switching due to failed authentication during Aggressive mode
The encoded ID payload gets destroyed by the authenticator, which caused a segmentation fault after the switch. Fixes #501.
This commit is contained in:
@@ -478,7 +478,7 @@ METHOD(task_t, process_r, status_t,
|
|||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
if (this->ph1->verify_auth(this->ph1, this->method, message,
|
if (this->ph1->verify_auth(this->ph1, this->method, message,
|
||||||
this->id_data))
|
chunk_clone(this->id_data)))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -487,12 +487,10 @@ METHOD(task_t, process_r, status_t,
|
|||||||
this->method, TRUE, NULL);
|
this->method, TRUE, NULL);
|
||||||
if (!this->peer_cfg)
|
if (!this->peer_cfg)
|
||||||
{
|
{
|
||||||
this->id_data = chunk_empty;
|
|
||||||
return send_delete(this);
|
return send_delete(this);
|
||||||
}
|
}
|
||||||
this->ike_sa->set_peer_cfg(this->ike_sa, this->peer_cfg);
|
this->ike_sa->set_peer_cfg(this->ike_sa, this->peer_cfg);
|
||||||
}
|
}
|
||||||
this->id_data = chunk_empty;
|
|
||||||
|
|
||||||
if (!charon->bus->authorize(charon->bus, FALSE))
|
if (!charon->bus->authorize(charon->bus, FALSE))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user