From 574f74d232aab2a3d2809de8e622e8e7ae8cc50e Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 19 Feb 2018 15:09:34 +0100 Subject: [PATCH] child-rekey: Don't destroy IKE_SA if initiating CHILD_SA rekeying failed This could happen if the peer e.g. selects an invalid DH group or responds multiple time with an INVALID_KE_PAYLAOD notify. --- src/libcharon/sa/ikev2/tasks/child_rekey.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcharon/sa/ikev2/tasks/child_rekey.c b/src/libcharon/sa/ikev2/tasks/child_rekey.c index f90056658..3ca29bca4 100644 --- a/src/libcharon/sa/ikev2/tasks/child_rekey.c +++ b/src/libcharon/sa/ikev2/tasks/child_rekey.c @@ -213,7 +213,8 @@ METHOD(task_t, build_i, status_t, message) != NEED_MORE) { schedule_delayed_rekey(this); - return FAILED; + message->set_exchange_type(message, EXCHANGE_TYPE_UNDEFINED); + return SUCCESS; } if (message->get_exchange_type(message) == CREATE_CHILD_SA) {