mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-10152: Skip the destination cidr in ipset when 0.0.0.0/0 pa… (#2334)
Skip the destination cidr in ipset when 0.0.0.0/0 passed. Fixed adding issue with egress dest cidr with 0.0.0.0/0.
This commit is contained in:
parent
cb9c7adddf
commit
88327580b0
@ -120,6 +120,7 @@ class CsAcl(CsDataBag):
|
||||
self.add_rule()
|
||||
|
||||
def add_rule(self):
|
||||
CIDR_ALL = '0.0.0.0/0'
|
||||
icmp_type = ''
|
||||
rule = self.rule
|
||||
icmp_type = "any"
|
||||
@ -172,6 +173,8 @@ class CsAcl(CsDataBag):
|
||||
|
||||
logging.debug("egress rule ####==> %s", self.rule)
|
||||
for cidr in self.rule['dcidr']:
|
||||
if cidr == CIDR_ALL:
|
||||
continue
|
||||
ipsetAddCmd = 'ipset add '+ destIpsetName + ' '+cidr
|
||||
CsHelper.execute(ipsetAddCmd)
|
||||
dflag = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user