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.
This commit is contained in:
Martin Willi
2013-06-18 09:50:29 +02:00
parent 9a00d9aa2f
commit 24303f99f7
+6 -1
View File
@@ -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;
}