]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ikev1: Invoke the assign_vips() bus hook for IKEv1 as well
authorMartin Willi <martin@revosec.ch>
Tue, 11 Feb 2014 08:49:44 +0000 (09:49 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 16 Jun 2014 13:59:17 +0000 (15:59 +0200)
src/libcharon/bus/listeners/listener.h
src/libcharon/sa/ikev1/tasks/mode_config.c

index 57445df01851f72484662601ec00a1fe762cc46d..9eee72264174919fe334384e215337b8b99314e0 100644 (file)
@@ -192,10 +192,10 @@ struct listener_t {
                                narrow_hook_t type, linked_list_t *local, linked_list_t *remote);
 
        /**
-        * Virtual IP address assignment hook
+        * Virtual IP address assignment hook.
         *
-        * This hook gets invoked when a a Virtual IP address is assigned to an
-        * IKE_SA (assign = TRUE) and again when it is released (assign = FALSE)
+        * This hook gets invoked after virtual IPs have been assigned to a peer
+        * for a specific IKE_SA, and again before they get released.
         *
         * @param ike_sa        IKE_SA the VIPs are assigned to
         * @param assign        TRUE if assigned to IKE_SA, FALSE if released
index d678f1942e6e3af4ff2f99a0a6e27bea698789cf..9a33f49f6c00bc26b619f8a6740b08cfe3f8d565 100644 (file)
@@ -393,6 +393,8 @@ static status_t build_set(private_mode_config_t *this, message_t *message)
        any4->destroy(any4);
        any6->destroy(any6);
 
+       charon->bus->assign_vips(charon->bus, this->ike_sa, TRUE);
+
        /* query registered providers for additional attributes to include */
        pools = linked_list_create_from_enumerator(
                                                                        config->create_pool_enumerator(config));
@@ -502,6 +504,8 @@ static status_t build_reply(private_mode_config_t *this, message_t *message)
        }
        enumerator->destroy(enumerator);
 
+       charon->bus->assign_vips(charon->bus, this->ike_sa, TRUE);
+
        /* query registered providers for additional attributes to include */
        enumerator = hydra->attributes->create_responder_enumerator(
                                                                                        hydra->attributes, pools, id, vips);