ikev1: Make sure proposed IPsec mode matches our own

References #557.
This commit is contained in:
Tobias Brunner 2014-08-12 15:15:02 +02:00
parent 34e402ef8d
commit 2d38a03d77
1 changed files with 2 additions and 1 deletions

View File

@ -1030,7 +1030,8 @@ METHOD(task_t, process_r, status_t,
}
tsi->destroy_offset(tsi, offsetof(traffic_selector_t, destroy));
tsr->destroy_offset(tsr, offsetof(traffic_selector_t, destroy));
if (!this->config || !this->tsi || !this->tsr)
if (!this->config || !this->tsi || !this->tsr ||
this->mode != this->config->get_mode(this->config))
{
DBG1(DBG_IKE, "no matching CHILD_SA config found");
return send_notify(this, INVALID_ID_INFORMATION);