]> 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>
Mon, 23 Aug 2021 16:10:15 +0000 (18:10 +0200)
No need to send an illegal request with just an error notify.

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

index 64dd55167bf4873a6fc1327f5cf14d2970805c64..0fada13c91edee1c460652f223ad740bc90c1bfe 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)