diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-08-14 16:59:22 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-16 16:14:15 +0200 |
commit | 71b89d672234e84e387f7c65883babe486d74edc (patch) | |
tree | 25739f9d771afa86fc0f7418eab5fd30d3382f6b /src/starter/netkey.c | |
parent | aaefeafb4943689c3882b3a434a484cc85c4c10e (diff) | |
download | strongswan-71b89d672234e84e387f7c65883babe486d74edc.tar.bz2 strongswan-71b89d672234e84e387f7c65883babe486d74edc.tar.xz |
Only load kernel plugins in starter when flushing SAD/SPD entries
This avoids keeping the kernel sockets open when they are not actually
needed, which could lead to resource problems (in particular with PF_KEY
where all open sockets receive all messages).
Fixes #217.
Diffstat (limited to 'src/starter/netkey.c')
-rw-r--r-- | src/starter/netkey.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/starter/netkey.c b/src/starter/netkey.c index c4784c533..25f68e505 100644 --- a/src/starter/netkey.c +++ b/src/starter/netkey.c @@ -58,6 +58,13 @@ bool starter_netkey_init(void) void starter_netkey_cleanup(void) { + if (!lib->plugins->load(lib->plugins, NULL, + lib->settings->get_str(lib->settings, "starter.load", PLUGINS))) + { + DBG1(DBG_APP, "unable to load kernel plugins"); + return; + } hydra->kernel_interface->flush_sas(hydra->kernel_interface); hydra->kernel_interface->flush_policies(hydra->kernel_interface); + lib->plugins->unload(lib->plugins); } |