load-tester: Fix race condition issuing same identity
authorChristophe Gouault <christophe.gouault@6wind.com>
Tue, 8 Apr 2014 15:11:13 +0000 (17:11 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 24 Apr 2014 15:54:15 +0000 (17:54 +0200)
commit2cbaa632951dd662e26e63299d8049c0d2bed8b1
tree30b874666081322b7efe8f737f80eae875b078b9
parenta68454bd68221490e5504969b5378a1e86f204de
load-tester: Fix race condition issuing same identity

Due to an unprotected incrementation, two load-tester initiators occasionally
use the same identifier under high load. The responder typically drops one of
the connections.

Use an atomic incrementation to avoid this race condition.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
src/libcharon/plugins/load_tester/load_tester_config.c