aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/modecfg.c
diff options
context:
space:
mode:
authorHeiko Hund <hhund@astaro.com>2010-07-07 16:45:36 +0200
committerMartin Willi <martin@revosec.ch>2010-07-09 13:09:31 +0200
commitec7adea0073a603f1ba40c45a931ec7eadab25d9 (patch)
tree5c0c319ada5f8f35408f42f4b0ada5fb5aee3a15 /src/pluto/modecfg.c
parentdb4ad736becd342c9b9b926801324f5ea5ab20df (diff)
downloadstrongswan-ec7adea0073a603f1ba40c45a931ec7eadab25d9.tar.bz2
strongswan-ec7adea0073a603f1ba40c45a931ec7eadab25d9.tar.xz
Added support for named attribute groups
Add the possibility to group attributes by a name and assign these groups to connections. This allows a more granular configuration of which client will receive what atrributes.
Diffstat (limited to 'src/pluto/modecfg.c')
-rw-r--r--src/pluto/modecfg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pluto/modecfg.c b/src/pluto/modecfg.c
index 50e14faa0..0d0cd899c 100644
--- a/src/pluto/modecfg.c
+++ b/src/pluto/modecfg.c
@@ -93,6 +93,7 @@ void modecfg_attribute_destroy(modecfg_attribute_t *this)
static void get_attributes(connection_t *c, linked_list_t *ca_list)
{
configuration_attribute_type_t type;
+ identification_t *client_id;
modecfg_attribute_t *ca;
enumerator_t *enumerator;
chunk_t value;
@@ -141,14 +142,13 @@ static void get_attributes(connection_t *c, linked_list_t *ca_list)
requested_vip = host_create_any(AF_INET);
}
+ client_id = (c->xauth_identity) ? c->xauth_identity : c->spd.that.id;
+
/* if no virtual IP has been assigned yet - acquire one */
if (c->spd.that.host_srcip->is_anyaddr(c->spd.that.host_srcip))
{
if (c->spd.that.pool)
{
- identification_t *client_id;
-
- client_id = (c->xauth_identity) ? c->xauth_identity : c->spd.that.id;
vip = hydra->attributes->acquire_address(hydra->attributes,
c->spd.that.pool, client_id, requested_vip);
if (vip)
@@ -185,7 +185,7 @@ static void get_attributes(connection_t *c, linked_list_t *ca_list)
/* assign attributes from registered providers */
enumerator = hydra->attributes->create_responder_enumerator(hydra->attributes,
- c->spd.that.id, vip);
+ c->spd.that.pool, client_id, vip);
while (enumerator->enumerate(enumerator, &type, &value))
{
ca = modecfg_attribute_create(type, value);