mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28334 from alprs/fix-iptables_comment
iptables needs -m comment for --comment to work
This commit is contained in:
commit
0d8bea6c43
1 changed files with 3 additions and 0 deletions
|
@ -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']
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue