From 81f6ec276b1322d79428e6195c03065259482a50 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 6 Jul 2010 11:50:43 +0200 Subject: Moved acquire job creation to kernel event handler. --- src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c') diff --git a/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c index 6773dcf87..b49009545 100644 --- a/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c +++ b/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -902,7 +901,6 @@ static void process_acquire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg* u_int32_t index, reqid = 0; traffic_selector_t *src_ts, *dst_ts; policy_entry_t *policy; - job_t *job; switch (msg->sadb_msg_satype) { @@ -931,17 +929,15 @@ static void process_acquire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg* } else { - DBG1(DBG_KNL, "received an SADB_ACQUIRE with policy id %d but no matching policy found", - index); + DBG1(DBG_KNL, "received an SADB_ACQUIRE with policy id %d but no" + " matching policy found", index); } src_ts = sadb_address2ts(response.src); dst_ts = sadb_address2ts(response.dst); this->mutex->unlock(this->mutex); - DBG1(DBG_KNL, "creating acquire job for policy %R === %R with reqid {%u}", - src_ts, dst_ts, reqid); - job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts); - hydra->processor->queue_job(hydra->processor, job); + charon->kernel_interface->acquire(charon->kernel_interface, reqid, src_ts, + dst_ts); } /** -- cgit v1.2.3