This may result in non-unique identifiers if threads access the variable
concurrently. While it is not very likely, we should fix that.
issue-status: open
issue-type: minor
issue-keyword: race, libcharon
if (!this->reqid)
{
/* reuse old reqid if we are rekeying an existing CHILD_SA */
+ /* BUG: the static variable reqid gets accessed non-atomic */
this->reqid = rekey ? rekey : ++reqid;
}
.other_auth = auth_cfg_create(),
.my_auths = linked_list_create(),
.other_auths = linked_list_create(),
+ /* BUG: static variable unique_id gets accessed non-atomic */
.unique_id = ++unique_id,
.peer_addresses = linked_list_create(),
.my_vips = linked_list_create(),