kernel-wfp: Uninstall policies before deleting provider
The policies reference the provider, so it might not actually get removed and be left dangling in the WFP system (maybe Windows refcounts it and still removes it).
This commit is contained in:
1 parent
5e89dd5c4d
commit
6b58665697
1 file changed
+3
-1
@@ -319,11 +319,13 @@ static void entry_destroy(private_kernel_wfp_ipsec_t *this, entry_t *entry)
|
||||
{
|
||||
IPsecSaContextDeleteById0(this->handle, entry->sa_id);
|
||||
}
|
||||
/* tunnel-mode policy filters reference the provider context, so remove
|
||||
* them before the context to avoid leaving it dangling in WFP */
|
||||
cleanup_policies(this, entry);
|
||||
if (entry->provider)
|
||||
{
|
||||
FwpmProviderContextDeleteById0(this->handle, entry->provider);
|
||||
}
|
||||
cleanup_policies(this, entry);
|
||||
array_destroy_function(entry->sps, (void*)sp_entry_destroy, NULL);
|
||||
entry->local->destroy(entry->local);
|
||||
entry->remote->destroy(entry->remote);
|
||||
|
||||
Reference in new issue
Block a user