]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
child-create: Just abort CREATE_CHILD_SA request if nonce creation fails
authorTobias Brunner <tobias@strongswan.org>
Thu, 20 May 2021 15:55:54 +0000 (17:55 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2022 16:42:01 +0000 (18:42 +0200)
No need to send an illegal request with just an error notify.

src/libcharon/sa/ikev2/tasks/child_create.c

index 5a6c1b4319ae389b418047de89bbe4581df9be3c..399aa1f81c9ddbb8c75e06a077bae2641b9ce577 100644 (file)
@@ -1094,8 +1094,7 @@ METHOD(task_t, build_i, status_t,
                case CREATE_CHILD_SA:
                        if (!generate_nonce(this))
                        {
-                               message->add_notify(message, FALSE, NO_PROPOSAL_CHOSEN,
-                                                                       chunk_empty);
+                               message->set_exchange_type(message, EXCHANGE_TYPE_UNDEFINED);
                                return SUCCESS;
                        }
                        if (!this->retry && this->dh_group == MODP_NONE)