kernel-interface: Pass the same data to del_policy() that was passed to add_policy()
The additional data can be helpful to identify the exact policy to delete.
This commit is contained in:
@@ -2456,15 +2456,16 @@ METHOD(kernel_ipsec_t, query_policy, status_t,
|
||||
}
|
||||
|
||||
METHOD(kernel_ipsec_t, del_policy, status_t,
|
||||
private_kernel_wfp_ipsec_t *this, traffic_selector_t *src_ts,
|
||||
traffic_selector_t *dst_ts, policy_dir_t direction, u_int32_t reqid,
|
||||
private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
|
||||
policy_dir_t direction, policy_type_t type, ipsec_sa_cfg_t *sa,
|
||||
mark_t mark, policy_priority_t priority)
|
||||
{
|
||||
if (direction == POLICY_OUT && priority == POLICY_PRIORITY_ROUTED)
|
||||
{
|
||||
if (remove_trap(this, reqid, FALSE, src_ts, dst_ts))
|
||||
if (remove_trap(this, sa->reqid, FALSE, src_ts, dst_ts))
|
||||
{
|
||||
remove_trap(this, reqid, TRUE, src_ts, dst_ts);
|
||||
remove_trap(this, sa->reqid, TRUE, src_ts, dst_ts);
|
||||
return SUCCESS;
|
||||
}
|
||||
return NOT_FOUND;
|
||||
|
||||
Reference in New Issue
Block a user