Update all connection feature flags on account update

This commit is contained in:
Daniel
2023-08-07 16:49:12 +02:00
parent 6c4a77a205
commit 37fbc4b74c
3 changed files with 32 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/safing/portmaster/network/netutils"
"github.com/safing/portmaster/network/packet"
"github.com/safing/portmaster/network/reference"
"github.com/safing/spn/access"
)
var (
@@ -61,6 +62,11 @@ func resetAllConnectionVerdicts() {
conn.Lock()
defer conn.Unlock()
// Update feature flags.
if err := conn.UpdateFeatures(); err != nil && !errors.Is(err, access.ErrNotLoggedIn) {
tracer.Warningf("network: failed to update connection feature flags: %s", err)
}
// Skip internal connections:
// - Pre-authenticated connections from Portmaster
// - Redirected DNS requests