iptables.build_rule - rule is a list, not a string

This commit is contained in:
Andreas Lutro 2015-07-28 10:07:45 +02:00
parent 13c2377e95
commit 4ce0606a31

View File

@ -218,7 +218,7 @@ def build_rule(table='filter', chain=None, command=None, position='', full=None,
if 'connstate' in kwargs:
if '-m state' not in rule:
rule += '-m state '
rule.append('-m state')
rule.append('{0}--state {1}'.format(maybe_add_negation('connstate'), kwargs['connstate']))