X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=src%2Flibcharon%2Fplugins%2Fdhcp%2Fdhcp_provider.c;h=dbcceb6ce8f9b5b638eee53082f1a3c823955d67;hp=a3e2690caf4acd25ff46f288719a3c0293b7d475;hb=19d49af53946999661209e0f915177b499a83585;hpb=ddc93db612b51179d8b62da931c2080708c8bd68 diff --git a/src/libcharon/plugins/dhcp/dhcp_provider.c b/src/libcharon/plugins/dhcp/dhcp_provider.c index a3e2690..dbcceb6 100644 --- a/src/libcharon/plugins/dhcp/dhcp_provider.c +++ b/src/libcharon/plugins/dhcp/dhcp_provider.c @@ -120,6 +120,7 @@ METHOD(attribute_provider_t, release_address, bool, this->mutex->unlock(this->mutex); if (transaction) { + this->socket->release(this->socket, transaction); transaction->destroy(transaction); return TRUE; } @@ -130,7 +131,23 @@ METHOD(attribute_provider_t, release_address, bool, METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*, private_dhcp_provider_t *this, identification_t *id, host_t *vip) { - return enumerator_create_empty(); + dhcp_transaction_t *transaction; + + if (!vip) + { + return NULL; + } + this->mutex->lock(this->mutex); + transaction = this->transactions->get(this->transactions, + (void*)hash_id_host(id, vip)); + if (!transaction) + { + this->mutex->unlock(this->mutex); + return NULL; + } + return enumerator_create_cleaner( + transaction->create_attribute_enumerator(transaction), + (void*)this->mutex->unlock, this->mutex); } METHOD(dhcp_provider_t, destroy, void,