]> git.ipfire.org Git - thirdparty/strongswan.git/commit
kernel-netlink: Let only a single thread work on a specific policy
authorTobias Brunner <tobias@strongswan.org>
Wed, 25 May 2016 10:15:38 +0000 (12:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 10 Jun 2016 08:45:35 +0000 (10:45 +0200)
commitebeaac1f2bd9caf6e886e9de2d639e02cd0eba78
treeebadcc155d162187edebc39be5a03fe86f943108
parent471b907613326de0b446a5c493a99b8f51a1ab53
kernel-netlink: Let only a single thread work on a specific policy

Other threads are free to add/update/delete other policies.

This tries to prevent race conditions caused by releasing the mutex while
sending messages to the kernel.  For instance, if break-before-make
reauthentication is used and one thread on the responder is delayed in
deleting the policies that another thread is concurrently adding for the
new SA.  This could have resulted in no policies being installed
eventually.

Fixes #1400.
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c