Merge pull request #5093 from brunoleon/fix_snat

Fix SNAT never being added because of exception
This commit is contained in:
Patrick Schult
2023-03-29 08:13:11 +02:00
committed by GitHub

View File

@@ -366,6 +366,8 @@ def snat4(snat_target):
chain.insert_rule(new_rule)
else:
for position, rule in enumerate(chain.rules):
if not hasattr(rule.target, 'parameter'):
continue
match = all((
new_rule.get_src() == rule.get_src(),
new_rule.get_dst() == rule.get_dst(),