From eb89a90e554c25b2a9e9c9cf6c2a562ec0e96b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Wed, 16 Aug 2023 11:55:46 +0200 Subject: [PATCH] ui: fixed setting daemon default action Reject option was not being taken into account. Closes #1017 --- ui/opensnitch/service.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/opensnitch/service.py b/ui/opensnitch/service.py index 48687ad845..abca096d53 100644 --- a/ui/opensnitch/service.py +++ b/ui/opensnitch/service.py @@ -655,10 +655,12 @@ def _overwrite_nodes_config(self, node_config): _default_action = self._cfg.getInt(self._cfg.DEFAULT_ACTION_KEY) try: temp_cfg = json.loads(newconf.config) - if _default_action == Config.ACTION_DENY_IDX: - temp_cfg['DefaultAction'] = Config.ACTION_DENY - else: + if _default_action == Config.ACTION_ALLOW_IDX: temp_cfg['DefaultAction'] = Config.ACTION_ALLOW + else: + temp_cfg['DefaultAction'] = Config.ACTION_DENY + + print("Setting daemon DefaultAction to:", temp_cfg['DefaultAction']) newconf.config = json.dumps(temp_cfg) except Exception as e: