diff options
author | Martin Willi <martin@revosec.ch> | 2014-11-04 15:38:07 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2015-02-20 13:34:56 +0100 |
commit | bc9ded9dbf39d064c3ff2239d9904566ff5888d6 (patch) | |
tree | 32004452b8ebec1d5706d84b7c1a701566ecf7e1 /src/libcharon/plugins/stroke/stroke_attribute.c | |
parent | a12f357b40c75987965ee0ea9ff4f8ad5573fc5a (diff) | |
download | strongswan-bc9ded9dbf39d064c3ff2239d9904566ff5888d6.tar.bz2 strongswan-bc9ded9dbf39d064c3ff2239d9904566ff5888d6.tar.xz |
attribute-provider: Pass full IKE_SA to provider backends
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_attribute.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_attribute.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_attribute.c b/src/libcharon/plugins/stroke/stroke_attribute.c index 0f3c38986..131253c69 100644 --- a/src/libcharon/plugins/stroke/stroke_attribute.c +++ b/src/libcharon/plugins/stroke/stroke_attribute.c @@ -120,11 +120,14 @@ static host_t *find_addr(private_stroke_attribute_t *this, linked_list_t *pools, } METHOD(attribute_provider_t, acquire_address, host_t*, - private_stroke_attribute_t *this, linked_list_t *pools, identification_t *id, + private_stroke_attribute_t *this, linked_list_t *pools, ike_sa_t *ike_sa, host_t *requested) { + identification_t *id; host_t *addr; + id = ike_sa->get_other_eap_id(ike_sa); + this->lock->read_lock(this->lock); addr = find_addr(this, pools, id, requested, MEM_POOL_EXISTING); @@ -144,13 +147,16 @@ METHOD(attribute_provider_t, acquire_address, host_t*, METHOD(attribute_provider_t, release_address, bool, private_stroke_attribute_t *this, linked_list_t *pools, host_t *address, - identification_t *id) + ike_sa_t *ike_sa) { enumerator_t *enumerator; + identification_t *id; mem_pool_t *pool; bool found = FALSE; char *name; + id = ike_sa->get_other_eap_id(ike_sa); + enumerator = pools->create_enumerator(pools); this->lock->read_lock(this->lock); while (enumerator->enumerate(enumerator, &name)) @@ -197,9 +203,8 @@ static bool attr_filter(void *lock, host_t **in, METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*, private_stroke_attribute_t *this, linked_list_t *pools, - identification_t *id, linked_list_t *vips) + ike_sa_t *ike_sa, linked_list_t *vips) { - ike_sa_t *ike_sa; peer_cfg_t *peer_cfg; enumerator_t *enumerator; attributes_t *attr; @@ -413,4 +418,3 @@ stroke_attribute_t *stroke_attribute_create() return &this->public; } - |