rhtyd closed pull request #2367: Fix ACL_INBOUND/OUTBOUND rules for
PrivateGateway
URL: https://github.com/apache/cloudstack/pull/2367
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
index 035125e4fea..06c59ff65bb 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
@@ -168,7 +168,7 @@ def compare(self, list):
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") or
rule_chain.startswith("ACL_OUTBOUND"):
- rule_count = self.chain.get_count(rule_chain)
+ rule_count = self.chain.get_count(rule_chain) if
self.chain.get_count(rule_chain) > 0 else 1
cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I
%s %s' % (new_rule.get_chain(), rule_count))
else:
cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I
%s %s' % (new_rule.get_chain(), fw[1]))
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services