Avoid a race condition when reloading secrets from ipsec.secrets
authorTobias Brunner <tobias@strongswan.org>
Fri, 1 Mar 2013 13:36:02 +0000 (14:36 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 20 Mar 2013 14:27:34 +0000 (15:27 +0100)
commit1a711789402b48f194de73e98eb16c8c80742bfd
tree40478a7871b24fa3a6fb9cd1a293f8f2d006741c
parentd307be7f6c3fac3e0ff0c94fe3ba25d333f1db73
Avoid a race condition when reloading secrets from ipsec.secrets

With the previous implementation that cleared the secrets in the active
credential set and then loaded the secrets, IKE SA establishment would
fail (as initiator or responder) if secrets are concurrently reloaded
and the required secret was not yet loaded.
src/libcharon/plugins/stroke/stroke_cred.c