From bac13de0530c22e830fc383198bc34214171eb0b Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Wed, 22 May 2024 20:43:12 +0200 Subject: [PATCH] wfp fix --- CHANGELOG.md | 3 +++ Sandboxie/core/dll/net.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e88c3903..6a42514b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,10 +23,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - split the advanced new box wizard page in two +- reorganized box options a bit ### Fixed - fixed issue with proxy authentication setting - fixed memory leak in sbiesvc +- fixed issue with inconsistent WFP option application [#3900](https://github.com/sandboxie-plus/Sandboxie/issues/3900) + diff --git a/Sandboxie/core/dll/net.c b/Sandboxie/core/dll/net.c index a0490a96..7cf7bef3 100644 --- a/Sandboxie/core/dll/net.c +++ b/Sandboxie/core/dll/net.c @@ -1381,7 +1381,10 @@ _FX BOOLEAN WSA_Init(HMODULE module) List_Init(&WSA_FwList); - WSA_WFPisEnabled = SbieApi_QueryConfBool(NULL, L"NetworkEnableWFP", FALSE); + ULONG Drv_Features = 0; + if (NT_SUCCESS(SbieApi_Call(API_QUERY_DRIVER_INFO, 3, 0, (ULONG_PTR)&Drv_Features, sizeof(Drv_Features)))) + WSA_WFPisEnabled = (Drv_Features & SBIE_FEATURE_FLAG_WFP) != 0; + if(WSA_WFPisEnabled) WSA_WFPisBlocking = !Config_GetSettingsForImageName_bool(L"AllowNetworkAccess", TRUE); else // load rules only when the driver is not doing the filtering