]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-tkm: Only skip creation of first child SA
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Wed, 8 Apr 2015 16:11:20 +0000 (18:11 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 May 2015 16:07:50 +0000 (18:07 +0200)
Use the new is_first boolean parameter of the
ALERT_KEEP_ON_CHILD_SA_FAILURE alert to determine if the failure was
caused by the first CHILD SA.

src/charon-tkm/src/tkm/tkm_listener.c

index bb12182665e0f7f2d124ca8c15899f88a7eb07fa..f57527602fa9fbf0de501f84b2c478e2cc6b5bdd 100644 (file)
@@ -14,6 +14,8 @@
  * for more details.
  */
 
+#include <stdarg.h>
+
 #include <daemon.h>
 #include <encoding/payloads/auth_payload.h>
 #include <utils/chunk.h>
@@ -209,6 +211,13 @@ METHOD(listener_t, alert, bool,
        {
                tkm_keymat_t *keymat;
                isa_id_type isa_id;
+               int is_first;
+
+               is_first = va_arg(args, int);
+               if (!is_first)
+               {
+                       return TRUE;
+               }
 
                keymat = (tkm_keymat_t*)ike_sa->get_keymat(ike_sa);
                isa_id = keymat->get_isa_id(keymat);