From 671ba59502fe998b312f9cc9daf085895b834c77 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 8 Jan 2018 12:23:26 +0500 Subject: [PATCH] Driver: Minor fixes. --- src/common/fortprov.c | 3 ++- src/driver/fortstat.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/fortprov.c b/src/common/fortprov.c index 44395acf..d91a38d8 100644 --- a/src/common/fortprov.c +++ b/src/common/fortprov.c @@ -54,6 +54,7 @@ fort_prov_flow_unregister (void) if (fort_prov_open(&engine)) return; + FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_CLOSURE_V4); FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_STREAM_V4); FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_DATAGRAM_V4); FwpmFilterDeleteByKey0(engine, (GUID *) &FORT_GUID_FILTER_IN_TRANSPORT_V4); @@ -200,7 +201,7 @@ fort_prov_flow_register (void) | FWP_CALLOUT_FLAG_ALLOW_MID_STREAM_INSPECTION; RtlZeroMemory(&cfilter4, sizeof(FWPM_FILTER0)); - cfilter4.flags = filter_flags; + cfilter4.flags = 0; cfilter4.filterKey = FORT_GUID_FILTER_CLOSURE_V4; cfilter4.layerKey = FWPM_LAYER_ALE_ENDPOINT_CLOSURE_V4; cfilter4.subLayerKey = FORT_GUID_SUBLAYER; diff --git a/src/driver/fortstat.c b/src/driver/fortstat.c index 7fd1625b..ff90294b 100644 --- a/src/driver/fortstat.c +++ b/src/driver/fortstat.c @@ -396,7 +396,7 @@ fort_stat_flow_associate (PFORT_STAT stat, UINT64 flow_id, *is_new_proc = TRUE; } - speed_limit = fort_stat_group_speed_limit(stat, group_index); + speed_limit = fort_stat_group_speed_limit(stat, group_index) != 0; flow = fort_stat_flow_add(stat, flow_id, group_index, proc_index, is_udp, speed_limit);