Merge "Change drop action" into stable/train

This commit is contained in:
Zuul 2020-08-04 02:49:22 +00:00 committed by Gerrit Code Review
commit 920023511d
1 changed files with 4 additions and 3 deletions

View File

@ -177,11 +177,12 @@ class ActionModule(ActionBase):
action = rule_data['action'] = rule.get('action', 'insert')
if action == 'drop':
rule_data['action'] = 'insert'
rule_data['state'] = 'absent'
rule_data['action'] = 'append'
rule_data['jump'] = rule.get('jump', 'DROP')
else:
rule_data['jump'] = rule.get('jump', 'ACCEPT')
rule_data['chain'] = rule.get('chain', 'INPUT')
rule_data['jump'] = rule.get('jump', 'ACCEPT')
rule_data['protocol'] = rule.get('proto', 'tcp')
if 'table' in rule:
rule_data['table'] = rule['table']