libipsec: Don't attempt deletion of any non-IPsec policies
An example are the fallback drop policies installed when updating SAs. We ignore such policies in add_policy() so there is no point in attempting to remove them. Since they use different priorities than regular policies this did not result in policies getting deleted unintentionally but there was an irritating log message on level 2 that indicated otherwise.
This commit is contained in:
parent
ac134b470a
commit
e1e88d5add
|
@ -183,7 +183,7 @@ METHOD(ipsec_policy_mgr_t, del_policy, status_t,
|
|||
ipsec_policy_entry_t *current, *found = NULL;
|
||||
u_int32_t priority;
|
||||
|
||||
if (direction == POLICY_FWD)
|
||||
if (type != POLICY_IPSEC || direction == POLICY_FWD)
|
||||
{ /* we ignore these policies as we currently have no use for them */
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue