mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
iptables module: match=conntrack with ctstate not working (#21976)
This commit is contained in:
parent
406505bfe5
commit
96a19a4521
1 changed files with 9 additions and 2 deletions
|
@ -399,8 +399,15 @@ def construct_rule(params):
|
||||||
False)
|
False)
|
||||||
append_match(rule, params['comment'], 'comment')
|
append_match(rule, params['comment'], 'comment')
|
||||||
append_param(rule, params['comment'], '--comment', False)
|
append_param(rule, params['comment'], '--comment', False)
|
||||||
append_match(rule, params['ctstate'], 'state')
|
if 'conntrack' in params['match']:
|
||||||
append_csv(rule, params['ctstate'], '--state')
|
append_csv(rule, params['ctstate'], '--ctstate')
|
||||||
|
elif 'state' in params['match']:
|
||||||
|
append_csv(rule, params['ctstate'], '--state')
|
||||||
|
elif params['ctstate']:
|
||||||
|
append_match(rule, params['ctstate'], 'conntrack')
|
||||||
|
append_csv(rule, params['ctstate'], '--ctstate')
|
||||||
|
else:
|
||||||
|
return False
|
||||||
append_match(rule, params['limit'] or params['limit_burst'], 'limit')
|
append_match(rule, params['limit'] or params['limit_burst'], 'limit')
|
||||||
append_param(rule, params['limit'], '--limit', False)
|
append_param(rule, params['limit'], '--limit', False)
|
||||||
append_param(rule, params['limit_burst'], '--limit-burst', False)
|
append_param(rule, params['limit_burst'], '--limit-burst', False)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue