diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-07-06 12:09:06 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-09-02 19:01:24 +0200 |
commit | a22853b302f6b15c03f647fcf4c9e9498314dcd7 (patch) | |
tree | d5623a0ed48ccdb131b63a53e54873f3da24a9e1 /src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c | |
parent | 81f6ec276b1322d79428e6195c03065259482a50 (diff) | |
download | strongswan-a22853b302f6b15c03f647fcf4c9e9498314dcd7.tar.bz2 strongswan-a22853b302f6b15c03f647fcf4c9e9498314dcd7.tar.xz |
Moved delete/rekey CHILD_SA job creation to kernel event handler.
Diffstat (limited to 'src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c')
-rw-r--r-- | src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c index 68fcab8de..b603b136a 100644 --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c @@ -42,8 +42,6 @@ #include <utils/hashtable.h> #include <processing/jobs/callback_job.h> #include <processing/jobs/migrate_job.h> -#include <processing/jobs/rekey_child_sa_job.h> -#include <processing/jobs/delete_child_sa_job.h> #include <processing/jobs/update_sa_job.h> /** required for Linux 2.6.26 kernel and later */ @@ -599,7 +597,6 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this, struct nlmsghd */ static void process_expire(private_kernel_netlink_ipsec_t *this, struct nlmsghdr *hdr) { - job_t *job; protocol_id_t protocol; u_int32_t spi, reqid; struct xfrm_user_expire *expire; @@ -613,23 +610,13 @@ static void process_expire(private_kernel_netlink_ipsec_t *this, struct nlmsghdr if (protocol != PROTO_ESP && protocol != PROTO_AH) { - DBG2(DBG_KNL, "ignoring XFRM_MSG_EXPIRE for SA with SPI %.8x and reqid {%u} " - "which is not a CHILD_SA", ntohl(spi), reqid); + DBG2(DBG_KNL, "ignoring XFRM_MSG_EXPIRE for SA with SPI %.8x and " + "reqid {%u} which is not a CHILD_SA", ntohl(spi), reqid); return; } - DBG1(DBG_KNL, "creating %s job for %N CHILD_SA with SPI %.8x and reqid {%d}", - expire->hard ? "delete" : "rekey", protocol_id_names, - protocol, ntohl(spi), reqid); - if (expire->hard) - { - job = (job_t*)delete_child_sa_job_create(reqid, protocol, spi); - } - else - { - job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi); - } - hydra->processor->queue_job(hydra->processor, job); + charon->kernel_interface->expire(charon->kernel_interface, reqid, protocol, + spi, expire->hard != 0); } /** |