Merge pull request #11850 from zeezooz/iptables_pknock_name

Allow name argument for pknock iptables module.
This commit is contained in:
Joseph Hall 2014-04-08 09:17:24 -06:00
commit 93f9222ade

View File

@ -136,7 +136,7 @@ def build_rule(table=None, chain=None, command=None, position='', full=None, fam
kwargs['match'] = kwargs['match'].split(',')
for match in kwargs['match']:
rule += '-m {0} '.format(match)
if 'name' in kwargs and match.strip() in ('quota2', 'recent'):
if 'name' in kwargs and match.strip() in ('pknock', 'quota2', 'recent'):
rule += '--name {0} '.format(kwargs['name'])
del kwargs['match']