Skip to content

Commit

Permalink
Prevent interface definitions overriding the 'changed' value while ot…
Browse files Browse the repository at this point in the history
…her elements are already changed

This fixes #234
  • Loading branch information
rlenferink committed Oct 20, 2024
1 parent dd6bdeb commit 7250f24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/firewall_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,8 +1468,8 @@ def exception_handler(exception_message):
changed = True
if permanent:
nm_used, if_changed = try_set_zone_of_interface(module, zone, item)
if nm_used:
changed = if_changed
if nm_used and if_changed:
changed = True
elif not fw_settings.queryInterface(item):
if not module.check_mode:
handle_interface_permanent(
Expand All @@ -1483,8 +1483,8 @@ def exception_handler(exception_message):
changed = True
if permanent:
nm_used, if_changed = try_set_zone_of_interface(module, "", item)
if nm_used:
changed = if_changed
if nm_used and if_changed:
changed = True
elif fw_settings.queryInterface(item):
if not module.check_mode:
fw_settings.removeInterface(item)
Expand Down

0 comments on commit 7250f24

Please sign in to comment.