Move set-mark after iptables jump

This commit is contained in:
Joseph Hall 2014-08-26 08:21:06 -06:00
parent ea2be8bc78
commit 17aa1f9049

View File

@ -292,6 +292,10 @@ def build_rule(table=None, chain=None, command=None, position='', full=None, fam
after_jump.append('--reject-with {0} '.format(kwargs['reject-with']))
del kwargs['reject-with']
if 'set-mark' in kwargs:
after_jump.append('--set-mark {0} '.format(kwargs['set-mark']))
del kwargs['set-mark']
for item in kwargs:
if str(kwargs[item]).startswith('!') or str(kwargs[item]).startswith('not'):
kwargs[item] = re.sub(bang_not_pat, '', kwargs[item])