Compare commits

..

No commits in common. "202609e4256efd674a9eda7e847e33bb76c20025" and "b9feff586f095daeefa9fcfe8d232968d0552291" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View file

@ -1,3 +0,0 @@
---
bugfixes:
- firewall - Fix issue where opening a specific port resulted in opening the whole protocol of the specified port

View file

@ -856,16 +856,15 @@ def main():
zone = module.params['zone'] zone = module.params['zone']
target = module.params['target'] target = module.params['target']
port = None
if module.params['port'] is not None: if module.params['port'] is not None:
if '/' in module.params['port']: if '/' in module.params['port']:
port, port_protocol = module.params['port'].strip().split('/') port, protocol = module.params['port'].strip().split('/')
else: else:
port_protocol = None protocol = None
if not port_protocol: if not protocol:
module.fail_json(msg='improper port format (missing protocol?)') module.fail_json(msg='improper port format (missing protocol?)')
else: else:
port_protocol = None port = None
port_forward_toaddr = '' port_forward_toaddr = ''
port_forward = None port_forward = None
@ -982,7 +981,7 @@ def main():
transaction = PortTransaction( transaction = PortTransaction(
module, module,
action_args=(port, port_protocol, timeout), action_args=(port, protocol, timeout),
zone=zone, zone=zone,
desired_state=desired_state, desired_state=desired_state,
permanent=permanent, permanent=permanent,
@ -994,7 +993,7 @@ def main():
if changed is True: if changed is True:
msgs.append( msgs.append(
"Changed port %s to %s" % ( "Changed port %s to %s" % (
"%s/%s" % (port, port_protocol), desired_state "%s/%s" % (port, protocol), desired_state
) )
) )