From d725b4542878a5dac8c974983d1865fdeee7def7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 21 Feb 2023 15:22:50 +0100 Subject: [PATCH] appsv2: fix reload_only_if_change option not working as expected, resulting in incorrect 'Firewall reloaded' messages --- src/firewall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/firewall.py b/src/firewall.py index 073e48c88..85e89c9c2 100644 --- a/src/firewall.py +++ b/src/firewall.py @@ -101,7 +101,7 @@ def firewall_allow( # Update and reload firewall _update_firewall_file(firewall) - if not no_reload or (reload_only_if_change and changed): + if (not reload_only_if_change and not no_reload) or (reload_only_if_change and changed): return firewall_reload() @@ -180,7 +180,7 @@ def firewall_disallow( # Update and reload firewall _update_firewall_file(firewall) - if not no_reload or (reload_only_if_change and changed): + if (not reload_only_if_change and not no_reload) or (reload_only_if_change and changed): return firewall_reload()