901 - added changes back to ticket

This commit is contained in:
SunilSamra
2023-06-13 09:45:45 +01:00
parent cdd7183d85
commit cf64990cff
5 changed files with 50 additions and 33 deletions

View File

@@ -97,7 +97,7 @@ class AccessControlList:
_port: the port
_position: position to insert ACL rule into ACL list (starting from index 1 and NOT 0)
"""
position_index = int(_position) - 1
position_index = int(_position)
new_rule = ACLRule(_permission, _source_ip, _dest_ip, _protocol, str(_port))
if len(self.acl) < self.max_acl_rules:
if len(self.acl) > position_index > -1: