diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-04-12 15:18:45 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-05-23 16:49:39 +0200 |
commit | 7caec9e4a40142803f22ed195704cdd46b097db1 (patch) | |
tree | f9d4a7e9ef889deeb54d29d0aae854beb5fb66d0 /src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c | |
parent | 9b29003cd9e12075070106eb9481954ab34912ca (diff) | |
download | strongswan-7caec9e4a40142803f22ed195704cdd46b097db1.tar.bz2 strongswan-7caec9e4a40142803f22ed195704cdd46b097db1.tar.xz |
kernel-netlink: Directly handle Netlink messages if thread pool is empty
During initialization of the plugins the thread pool is not yet
initialized so there is no watcher thread that could handle the queued
Netlink message and the main thread will wait indefinitely for a
response.
Fixes #2199.
Diffstat (limited to 'src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c')
-rw-r--r-- | src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c index da54031a1..cf85cb0a6 100644 --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c @@ -333,7 +333,8 @@ static status_t send_once(private_netlink_socket_t *this, struct nlmsghdr *in, while (!entry->complete) { if (this->parallel && - lib->watcher->get_state(lib->watcher) != WATCHER_STOPPED) + lib->watcher->get_state(lib->watcher) != WATCHER_STOPPED && + lib->processor->get_total_threads(lib->processor)) { if (this->timeout) { |