mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-17 00:00:59 -04:00
kernel-pfkey: Prefer policies with reqid over those without
This commit is contained in:
parent
0ff8ce9452
commit
fd8f1194f3
@ -2598,7 +2598,13 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
|
||||
enumerator = policy->used_by->create_enumerator(policy->used_by);
|
||||
while (enumerator->enumerate(enumerator, (void**)¤t_sa))
|
||||
{
|
||||
if (current_sa->priority >= assigned_sa->priority)
|
||||
if (current_sa->priority > assigned_sa->priority)
|
||||
{
|
||||
break;
|
||||
}
|
||||
/* prefer SAs with a reqid over those without */
|
||||
if (current_sa->priority == assigned_sa->priority &&
|
||||
(!current_sa->sa->cfg.reqid || assigned_sa->sa->cfg.reqid))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user