Merge pull request #28334 from alprs/fix-iptables_comment

iptables needs -m comment for --comment to work
This commit is contained in:
Mike Place 2015-10-28 08:24:52 -06:00
commit 0d8bea6c43

View file

@ -261,6 +261,9 @@ def build_rule(table='filter', chain=None, command=None, position='', full=None,
del kwargs[multiport_arg]
if 'comment' in kwargs:
if '-m comment' not in rule:
rule.append('-m comment')
rule.append('--comment "{0}"'.format(kwargs['comment']))
del kwargs['comment']