mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-8925 - Drop the traffic when default egress is set to false
- The DROP rule should be appended and the other rules inserted.
This commit is contained in:
parent
e3a4ec6cfd
commit
caa0b4071c
@ -97,12 +97,16 @@ class CsAcl(CsDataBag):
|
||||
self.rule['last_port'] = obj['src_port_range'][1]
|
||||
self.rule['allowed'] = True
|
||||
|
||||
self.rule['action'] = "ACCEPT"
|
||||
|
||||
# In that case it means we are processing the default egress rule
|
||||
if self.rule['type'] == 'all' and not obj['source_cidr_list']:
|
||||
if self.rule['default_egress_policy'] == 'false':
|
||||
self.rule['action'] = "DROP"
|
||||
self.rule['cidr'] = ['0.0.0.0/0']
|
||||
else:
|
||||
self.rule['cidr'] = obj['source_cidr_list']
|
||||
|
||||
self.rule['action'] = "ACCEPT"
|
||||
logging.debug("AclIP created for rule ==> %s", self.rule)
|
||||
|
||||
def create(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user