made ctstate default to [] and evaluation conditional on the list being popoulated

pull/18777/head
Brian Coca 9 years ago committed by Matt Clay
parent fb3aec47ca
commit 61ba4b98e1

@ -262,6 +262,7 @@ def construct_rule(params):
append_param(rule, params['to_ports'], '--to-ports', False) append_param(rule, params['to_ports'], '--to-ports', False)
append_comm(rule, params['comment']) append_comm(rule, params['comment'])
append_param(rule, params['comment'], '--comment', False) append_param(rule, params['comment'], '--comment', False)
if params['ctstate']:
append_conntrack(rule, params['ctstate']) append_conntrack(rule, params['ctstate'])
append_param(rule, ','.join(params['ctstate']), '--ctstate', False) append_param(rule, ','.join(params['ctstate']), '--ctstate', False)
return rule return rule

Loading…
Cancel
Save