diff options
author | Martin Willi <martin@revosec.ch> | 2013-06-18 09:50:29 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-06-18 09:50:29 +0200 |
commit | 24303f99f71754caec7eb6ef6ba066c79918ed41 (patch) | |
tree | 716c8a57f083f7699e83b660d8b25e49e1beb07b /src/libcharon/plugins/dhcp/dhcp_provider.c | |
parent | 9a00d9aa2fc8b9b1f23cfd16b93de7dc6cc633d8 (diff) | |
download | strongswan-24303f99f71754caec7eb6ef6ba066c79918ed41.tar.bz2 strongswan-24303f99f71754caec7eb6ef6ba066c79918ed41.tar.xz |
dhcp: search for transactions only for connections having a poolname "dhcp"
When a connection has a single pool that queries recursively the DHCP backend,
we shouldn't return any attributes directly from DHCP when queried for that
pool.
Diffstat (limited to 'src/libcharon/plugins/dhcp/dhcp_provider.c')
-rw-r--r-- | src/libcharon/plugins/dhcp/dhcp_provider.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcharon/plugins/dhcp/dhcp_provider.c b/src/libcharon/plugins/dhcp/dhcp_provider.c index f83efda5d..e092771f4 100644 --- a/src/libcharon/plugins/dhcp/dhcp_provider.c +++ b/src/libcharon/plugins/dhcp/dhcp_provider.c @@ -162,6 +162,12 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*, enumerator_t *enumerator; host_t *vip; + if (pools->find_first(pools, (linked_list_match_t)streq, + NULL, "dhcp") != SUCCESS) + { + return NULL; + } + this->mutex->lock(this->mutex); enumerator = vips->create_enumerator(vips); while (enumerator->enumerate(enumerator, &vip)) @@ -225,4 +231,3 @@ dhcp_provider_t *dhcp_provider_create(dhcp_socket_t *socket) return &this->public; } - |