You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/11/21 11:53:25 UTC
[cloudstack] 02/02: make egress rule work for 0.0.0.0/0 dest
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 2246ae98620414bbb5a096e12645fb308ead0205
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Tue Nov 21 17:20:09 2017 +0530
make egress rule work for 0.0.0.0/0 dest
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
systemvm/patches/debian/config/opt/cloud/bin/configure.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py
index f111309..e49349b 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py
@@ -172,8 +172,13 @@ class CsAcl(CsDataBag):
logging.debug("egress rule ####==> %s", self.rule)
for cidr in self.rule['dcidr']:
- ipsetAddCmd = 'ipset add '+ destIpsetName + ' '+cidr
- CsHelper.execute(ipsetAddCmd)
+ # Bug reference: https://bugzilla.redhat.com/show_bug.cgi?id=1297092
+ if cidr == '0.0.0.0/0':
+ CsHelper.execute('ipset add '+ destIpsetName + ' 0.0.0.0/1')
+ CsHelper.execute('ipset add '+ destIpsetName + ' 128.0.0.0/1')
+ else:
+ ipsetAddCmd = 'ipset add '+ destIpsetName + ' ' + cidr
+ CsHelper.execute(ipsetAddCmd)
dflag = True
self.fw.append(["filter", "", " -A FW_OUTBOUND -j FW_EGRESS_RULES"])
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.