CLOUDSTACK-10135 ACL rules order is not maintained for ACL_OUTBOUND in VPC VR (#2313)

This commit is contained in:
subhash yedugundla 2017-11-15 14:36:00 +05:30 committed by René Moser
parent 3ee8d83621
commit 60bec39b9d

View File

@ -167,7 +167,7 @@ class CsNetfilters(object):
cpy = cpy.replace('-A', '-I')
if isinstance(fw[1], int):
# if the rule is for ACLs, we want to insert them in order, right before the DROP all
if rule_chain.startswith("ACL_INBOUND"):
if rule_chain.startswith("ACL_INBOUND") or rule_chain.startswith("ACL_OUTBOUND"):
rule_count = self.chain.get_count(rule_chain)
cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I %s %s' % (new_rule.get_chain(), rule_count))
else: