From: Tobias Brunner Date: Thu, 26 Mar 2020 07:41:00 +0000 (+0100) Subject: quick-mode: Make sure we have a proposal before determining lifetimes X-Git-Tag: 5.8.4~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb26c5547c78ece55baae7516ce993043b5b0783;p=thirdparty%2Fstrongswan.git quick-mode: Make sure we have a proposal before determining lifetimes Fixes: e0dd36c9c730 ("ikev1: Get and set the lifetimes of the selected proposal/transform") --- diff --git a/src/libcharon/sa/ikev1/tasks/quick_mode.c b/src/libcharon/sa/ikev1/tasks/quick_mode.c index f494e48c83..50c280fe58 100644 --- a/src/libcharon/sa/ikev1/tasks/quick_mode.c +++ b/src/libcharon/sa/ikev1/tasks/quick_mode.c @@ -1147,9 +1147,6 @@ METHOD(task_t, process_r, status_t, flags); list->destroy_offset(list, offsetof(proposal_t, destroy)); - get_lifetimes(this); - apply_lifetimes(this, sa_payload); - if (!this->proposal) { DBG1(DBG_IKE, "no matching proposal found, sending %N", @@ -1158,6 +1155,9 @@ METHOD(task_t, process_r, status_t, } this->spi_i = this->proposal->get_spi(this->proposal); + get_lifetimes(this); + apply_lifetimes(this, sa_payload); + if (!get_nonce(this, &this->nonce_i, message)) { return send_notify(this, INVALID_PAYLOAD_TYPE);