diff --git a/plugins/modules/firewalld.py b/plugins/modules/firewalld.py index f892cd38c84..95bfe53eab3 100644 --- a/plugins/modules/firewalld.py +++ b/plugins/modules/firewalld.py @@ -706,7 +706,7 @@ def get_enabled_immediate(self, port, proto, toport, toaddr, timeout): if self.fw_offline: dummy, fw_settings = self.get_fw_zone_settings() return fw_settings.queryForwardPort(port=port, protocol=proto, to_port=toport, to_addr=toaddr) - return self.fw.queryForwardPort(port=port, protocol=proto, to_port=toport, to_addr=toaddr) + return self.fw.queryForwardPort(zone=self.zone, port=port, protocol=proto, toport=toport, toaddr=toaddr) def get_enabled_permanent(self, port, proto, toport, toaddr, timeout): dummy, fw_settings = self.get_fw_zone_settings() diff --git a/tests/integration/targets/firewalld/tasks/run_all_tests.yml b/tests/integration/targets/firewalld/tasks/run_all_tests.yml index 29d253d7769..c125a9e2a74 100644 --- a/tests/integration/targets/firewalld/tasks/run_all_tests.yml +++ b/tests/integration/targets/firewalld/tasks/run_all_tests.yml @@ -14,7 +14,10 @@ - include_tasks: port_test_cases.yml # firewalld source operation test cases -- import_tasks: source_test_cases.yml +- include_tasks: source_test_cases.yml # firewalld zone target operation test cases -- import_tasks: zone_target_test_cases.yml \ No newline at end of file +- include_tasks: zone_target_test_cases.yml + +# firewalld port forwarding operation test cases +- include_tasks: port_foward_test_cases.yml \ No newline at end of file