]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ikev1: Add a getter for the configuration used in the Quick Mode task
authorMartin Willi <martin@revosec.ch>
Tue, 2 Jun 2015 09:57:54 +0000 (11:57 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 29 Jun 2015 07:22:50 +0000 (09:22 +0200)
src/libcharon/sa/ikev1/tasks/quick_mode.c
src/libcharon/sa/ikev1/tasks/quick_mode.h

index ee6d9493fbcaac6080f723c139ccbc0123efb7a2..3c938b51778f15680fdd00d221443656bce8ebea 100644 (file)
@@ -1357,6 +1357,12 @@ METHOD(quick_mode_t, rekey, void,
        this->rekey = spi;
 }
 
+METHOD(quick_mode_t, get_config, child_cfg_t*,
+       private_quick_mode_t *this)
+{
+       return this->config;
+}
+
 METHOD(task_t, migrate, void,
        private_quick_mode_t *this, ike_sa_t *ike_sa)
 {
@@ -1420,6 +1426,7 @@ quick_mode_t *quick_mode_create(ike_sa_t *ike_sa, child_cfg_t *config,
                        .use_reqid = _use_reqid,
                        .use_marks = _use_marks,
                        .rekey = _rekey,
+                       .get_config = _get_config,
                },
                .ike_sa = ike_sa,
                .initiator = config != NULL,
index ee9b64d1394cdde4f6024e451565c434164e5e3b..6e6a033d2e49c7cc8d221e334ca75c2ee7f9fa45 100644 (file)
@@ -58,6 +58,13 @@ struct quick_mode_t {
         * @param spi                   spi of SA to rekey
         */
        void (*rekey)(quick_mode_t *this, u_int32_t spi);
+
+       /**
+        * Get the used CHILD_SA configuration.
+        *
+        * @return                              config
+        */
+       child_cfg_t* (*get_config)(quick_mode_t *this);
 };
 
 /**