diff options
Diffstat (limited to 'src/libipsec/ipsec_policy_mgr.c')
-rw-r--r-- | src/libipsec/ipsec_policy_mgr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libipsec/ipsec_policy_mgr.c b/src/libipsec/ipsec_policy_mgr.c index 72f94ec20..02dc59d65 100644 --- a/src/libipsec/ipsec_policy_mgr.c +++ b/src/libipsec/ipsec_policy_mgr.c @@ -230,7 +230,8 @@ METHOD(ipsec_policy_mgr_t, flush_policies, status_t, } METHOD(ipsec_policy_mgr_t, find_by_packet, ipsec_policy_t*, - private_ipsec_policy_mgr_t *this, ip_packet_t *packet, bool inbound) + private_ipsec_policy_mgr_t *this, ip_packet_t *packet, bool inbound, + u_int32_t reqid) { enumerator_t *enumerator; ipsec_policy_entry_t *current; @@ -245,8 +246,11 @@ METHOD(ipsec_policy_mgr_t, find_by_packet, ipsec_policy_t*, if ((inbound == (policy->get_direction(policy) == POLICY_IN)) && policy->match_packet(policy, packet)) { - found = policy->get_ref(policy); - break; + if (reqid == 0 || reqid == policy->get_reqid(policy)) + { + found = policy->get_ref(policy); + break; + } } } enumerator->destroy(enumerator); |