diff --git a/src/driver/common/fortconf.c b/src/driver/common/fortconf.c index d59e0a97..57379249 100644 --- a/src/driver/common/fortconf.c +++ b/src/driver/common/fortconf.c @@ -187,7 +187,7 @@ FORT_API BOOL fort_conf_ip_included(const PFORT_CONF conf, FORT_API BOOL fort_conf_app_exe_equal( const PFORT_APP_ENTRY app_entry, const PVOID path, UINT32 path_len) { - const char *app_path = (const char *) (app_entry + 1); + const PVOID app_path = app_entry + 1; const UINT32 app_path_len = app_entry->path_len; if (path_len != app_path_len) @@ -250,7 +250,7 @@ static FORT_APP_ENTRY fort_conf_app_wild_find( static int fort_conf_app_prefix_cmp(PFORT_APP_ENTRY app_entry, const PVOID path, UINT32 path_len) { - const char *app_path = (const char *) (app_entry + 1); + const PVOID app_path = app_entry + 1; const UINT32 app_path_len = app_entry->path_len; if (path_len > app_path_len) diff --git a/src/driver/common/fortconf.h b/src/driver/common/fortconf.h index 7d3d1d2f..8e8697fd 100644 --- a/src/driver/common/fortconf.h +++ b/src/driver/common/fortconf.h @@ -16,8 +16,8 @@ #define FORT_CONF_STR_ALIGN 4 #define FORT_CONF_STR_HEADER_SIZE(n) (((n) + 1) * sizeof(UINT32)) #define FORT_CONF_STR_DATA_SIZE(size) FORT_ALIGN_SIZE((size), FORT_CONF_STR_ALIGN) -#define FORT_CONF_APP_ENTRY_SIZE(len) \ - (sizeof(FORT_APP_ENTRY) + (len) + sizeof(WCHAR)) /* include terminating zero */ +#define FORT_CONF_APP_ENTRY_SIZE(path_len) \ + (sizeof(FORT_APP_ENTRY) + (path_len) + sizeof(WCHAR)) /* include terminating zero */ typedef struct fort_conf_flags { diff --git a/src/driver/fortcnf.c b/src/driver/fortcnf.c index 169df2c5..5af63b81 100644 --- a/src/driver/fortcnf.c +++ b/src/driver/fortcnf.c @@ -132,7 +132,7 @@ static NTSTATUS fort_conf_ref_exe_new_entry(PFORT_CONF_REF conf_ref, const PVOID /* Copy path */ { - char *new_path = (char *) (entry + 1); + PVOID new_path = entry + 1; RtlCopyMemory(new_path, path, path_len); } @@ -180,7 +180,7 @@ FORT_API NTSTATUS fort_conf_ref_exe_add_path( FORT_API NTSTATUS fort_conf_ref_exe_add_entry( PFORT_CONF_REF conf_ref, const PFORT_APP_ENTRY entry, BOOL locked) { - const PVOID path = (const PVOID)(entry + 1); + const PVOID path = entry + 1; const UINT32 path_len = entry->path_len; const FORT_APP_FLAGS flags = entry->flags; diff --git a/src/driver/fortcout.c b/src/driver/fortcout.c index 9316b2f8..3d3481f5 100644 --- a/src/driver/fortcout.c +++ b/src/driver/fortcout.c @@ -244,10 +244,11 @@ inline static BOOL fort_callout_ale_is_allowed(PCFORT_CALLOUT_ARG ca, PFORT_CALL return !cx->blocked /* collect traffic, when Filter Disabled */ /* "Allow, if not blocked" or "Ask to Connect" */ || fort_callout_ale_is_new(conf_flags, app_data) - /* "Allow, if not blocked" or "Ask to Connect" */ - || !fort_callout_ale_is_zone_blocked(ca, cx, conf_ref, app_data) - /* check the conf for a blocked app */ - || !fort_conf_app_blocked(&conf_ref->conf, app_data.flags, &cx->block_reason); + || !( + /* check LAN Only and Zones */ + fort_callout_ale_is_zone_blocked(ca, cx, conf_ref, app_data) + /* check the conf for a blocked app */ + || fort_conf_app_blocked(&conf_ref->conf, app_data.flags, &cx->block_reason)); } inline static void fort_callout_ale_log(PCFORT_CALLOUT_ARG ca, PFORT_CALLOUT_ALE_EXTRA cx, diff --git a/src/ui/util/conf/confutil.h b/src/ui/util/conf/confutil.h index b8d3984a..9fc6d667 100644 --- a/src/ui/util/conf/confutil.h +++ b/src/ui/util/conf/confutil.h @@ -17,8 +17,6 @@ class ConfAppsWalker; class EnvManager; class FirewallConf; -struct fort_traf; - using longs_arr_t = QVector; using shorts_arr_t = QVector; using chars_arr_t = QVector;