aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/dhcp/dhcp_provider.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-03-24 15:28:14 +0100
committerMartin Willi <martin@revosec.ch>2010-03-25 14:29:10 +0100
commitb262429e0b991ec8dbe7f7694c8f0418023f0fde (patch)
tree51012f3a4818c86cbf01b98a8d25c790274b8feb /src/libcharon/plugins/dhcp/dhcp_provider.c
parent913eb696929d9c611cc9a85a0609c122467f696e (diff)
downloadstrongswan-b262429e0b991ec8dbe7f7694c8f0418023f0fde.tar.bz2
strongswan-b262429e0b991ec8dbe7f7694c8f0418023f0fde.tar.xz
Include configuration payloads for DNS/WINS server received via DHCP
Diffstat (limited to 'src/libcharon/plugins/dhcp/dhcp_provider.c')
-rw-r--r--src/libcharon/plugins/dhcp/dhcp_provider.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libcharon/plugins/dhcp/dhcp_provider.c b/src/libcharon/plugins/dhcp/dhcp_provider.c
index a3a289595..dbcceb6ce 100644
--- a/src/libcharon/plugins/dhcp/dhcp_provider.c
+++ b/src/libcharon/plugins/dhcp/dhcp_provider.c
@@ -131,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,