From: Martin Willi Date: Tue, 11 Feb 2014 08:49:44 +0000 (+0100) Subject: ikev1: Invoke the assign_vips() bus hook for IKEv1 as well X-Git-Tag: 5.2.0rc1~54^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fc98a840b0f6fe0abace9b28db85234ca84b5ec;p=thirdparty%2Fstrongswan.git ikev1: Invoke the assign_vips() bus hook for IKEv1 as well --- diff --git a/src/libcharon/bus/listeners/listener.h b/src/libcharon/bus/listeners/listener.h index 57445df018..9eee722641 100644 --- a/src/libcharon/bus/listeners/listener.h +++ b/src/libcharon/bus/listeners/listener.h @@ -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 diff --git a/src/libcharon/sa/ikev1/tasks/mode_config.c b/src/libcharon/sa/ikev1/tasks/mode_config.c index d678f1942e..9a33f49f6c 100644 --- a/src/libcharon/sa/ikev1/tasks/mode_config.c +++ b/src/libcharon/sa/ikev1/tasks/mode_config.c @@ -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);