From: Martin Willi Date: Tue, 18 Jun 2013 07:50:29 +0000 (+0200) Subject: dhcp: search for transactions only for connections having a poolname "dhcp" X-Git-Tag: 5.1.0dr1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24303f99f71754caec7eb6ef6ba066c79918ed41;p=thirdparty%2Fstrongswan.git 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. --- diff --git a/src/libcharon/plugins/dhcp/dhcp_provider.c b/src/libcharon/plugins/dhcp/dhcp_provider.c index f83efda5d4..e092771f42 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; } -