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)
|
||||
append_match(rule, params['comment'], 'comment')
|
||||
append_param(rule, params['comment'], '--comment', False)
|
||||
append_match(rule, params['ctstate'], 'state')
|
||||
append_csv(rule, params['ctstate'], '--state')
|
||||
if 'conntrack' in params['match']:
|
||||
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_param(rule, params['limit'], '--limit', False)
|
||||
append_param(rule, params['limit_burst'], '--limit-burst', False)
|
||||
|
|
Loading…
Reference in a new issue