mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:57:24 +00:00
Driver: fortprov: Simplify fort_prov_unregister_callouts()
This commit is contained in:
parent
1e3b10d676
commit
5e942057ba
@ -26,16 +26,12 @@ static void fort_prov_unregister_callouts(HANDLE engine)
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_CONNECT_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_ACCEPT_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_ACCEPT_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_IN_MAC_FRAME);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_OUT_MAC_FRAME);
|
||||
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_REAUTH_IN_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_REAUTH_IN_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_REAUTH_OUT_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_REAUTH_OUT_V6);
|
||||
|
||||
FwpmSubLayerDeleteByKey0(engine, (GUID *) &FORT_GUID_SUBLAYER);
|
||||
FwpmCalloutDeleteByKey0(engine, (GUID *) &FORT_GUID_CALLOUT_CONNECT_V4);
|
||||
FwpmCalloutDeleteByKey0(engine, (GUID *) &FORT_GUID_CALLOUT_CONNECT_V6);
|
||||
@ -47,9 +43,20 @@ static void fort_prov_unregister_callouts(HANDLE engine)
|
||||
FwpmCalloutDeleteByKey0(engine, (GUID *) &FORT_GUID_CALLOUT_DATAGRAM_V6);
|
||||
FwpmCalloutDeleteByKey0(engine, (GUID *) &FORT_GUID_CALLOUT_IN_MAC_FRAME);
|
||||
FwpmCalloutDeleteByKey0(engine, (GUID *) &FORT_GUID_CALLOUT_OUT_MAC_FRAME);
|
||||
|
||||
FwpmProviderDeleteByKey0(engine, (GUID *) &FORT_GUID_PROVIDER);
|
||||
}
|
||||
|
||||
static void fort_prov_flow_unregister_callouts(HANDLE engine)
|
||||
{
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_IN_MAC_FRAME);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_OUT_MAC_FRAME);
|
||||
}
|
||||
|
||||
FORT_API void fort_prov_unregister(HANDLE transEngine)
|
||||
{
|
||||
HANDLE engine = transEngine;
|
||||
@ -62,6 +69,7 @@ FORT_API void fort_prov_unregister(HANDLE transEngine)
|
||||
}
|
||||
|
||||
fort_prov_unregister_callouts(engine);
|
||||
fort_prov_flow_unregister_callouts(engine);
|
||||
|
||||
if (!transEngine) {
|
||||
fort_prov_trans_commit(engine);
|
||||
@ -69,16 +77,6 @@ FORT_API void fort_prov_unregister(HANDLE transEngine)
|
||||
}
|
||||
}
|
||||
|
||||
static void fort_prov_flow_unregister_callouts(HANDLE engine)
|
||||
{
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V4);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V6);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_IN_MAC_FRAME);
|
||||
FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_OUT_MAC_FRAME);
|
||||
}
|
||||
|
||||
FORT_API void fort_prov_flow_unregister(HANDLE transEngine)
|
||||
{
|
||||
HANDLE engine = transEngine;
|
||||
|
Loading…
Reference in New Issue
Block a user