Invoke ike_updown hook on authentication failure not before response sent

This commit is contained in:
Martin Willi
2012-03-05 18:08:04 +01:00
parent 0853ff39c5
commit 4cd176d525
+2 -3
View File
@@ -641,11 +641,9 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
enumerator); enumerator);
} }
break; break;
case DESTROY_ME:
case FAILED: case FAILED:
default: default:
charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
/* FALL */
case DESTROY_ME:
/* destroy IKE_SA, but SEND response first */ /* destroy IKE_SA, but SEND response first */
delete = TRUE; delete = TRUE;
break; break;
@@ -680,6 +678,7 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
this->responding.packet->clone(this->responding.packet)); this->responding.packet->clone(this->responding.packet));
if (delete) if (delete)
{ {
charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
return DESTROY_ME; return DESTROY_ME;
} }
return SUCCESS; return SUCCESS;