From 01563352e8f95c24d50cb7e987aa9afed639dd44 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 6 Jul 2010 12:34:15 +0200 Subject: Moved update SA job creation to kernel event handler. --- src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 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 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 #include #include -#include /** 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); } } } -- cgit v1.2.3