aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2010-07-06 12:34:15 +0200
committerTobias Brunner <tobias@strongswan.org>2010-09-02 19:01:24 +0200
commit01563352e8f95c24d50cb7e987aa9afed639dd44 (patch)
tree983610fded5edfb52812aac4960a7220cb5bf5f5 /src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
parenta22853b302f6b15c03f647fcf4c9e9498314dcd7 (diff)
downloadstrongswan-01563352e8f95c24d50cb7e987aa9afed639dd44.tar.bz2
strongswan-01563352e8f95c24d50cb7e987aa9afed639dd44.tar.xz
Moved update SA job creation to kernel event handler.
Diffstat (limited to 'src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c')
-rw-r--r--src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index b91b6d141..28cc98021 100644
--- a/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -61,7 +61,6 @@
#include <threading/mutex.h>
#include <processing/jobs/callback_job.h>
#include <processing/jobs/migrate_job.h>
-#include <processing/jobs/update_sa_job.h>
/** non linux specific */
#ifndef IPPROTO_COMP
@@ -1040,7 +1039,6 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
pfkey_msg_t response;
u_int32_t spi, reqid;
host_t *host;
- job_t *job;
DBG2(DBG_KNL, "received an SADB_X_NAT_T_NEW_MAPPING");
@@ -1052,7 +1050,8 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
if (!response.x_sa2)
{
- DBG1(DBG_KNL, "received SADB_X_NAT_T_NEW_MAPPING is missing required information");
+ DBG1(DBG_KNL, "received SADB_X_NAT_T_NEW_MAPPING is missing required "
+ "information");
return;
}
@@ -1080,10 +1079,8 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
host = host_create_from_sockaddr(sa);
if (host)
{
- DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and "
- "reqid {%u} changed, queuing update job", ntohl(spi), reqid);
- job = (job_t*)update_sa_job_create(reqid, host);
- hydra->processor->queue_job(hydra->processor, job);
+ charon->kernel_interface->mapping(charon->kernel_interface, reqid,
+ spi, host);
}
}
}