mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-9793: Faster ip in subnet check
This change removes an unnecessary conversion from IPNetwork to list in one of the router scripts. This makes the router faster at processing static NAT rules, which can prevent timeouts when attaching or detaching IPs.
This commit is contained in:
parent
d84347ba8c
commit
d5c5eb10f8
|
|
@ -145,7 +145,7 @@ class CsInterface:
|
|||
def ip_in_subnet(self, ip):
|
||||
ipo = IPAddress(ip)
|
||||
net = IPNetwork("%s/%s" % (self.get_ip(), self.get_size()))
|
||||
return ipo in list(net)
|
||||
return ipo in net
|
||||
|
||||
def get_gateway_cidr(self):
|
||||
return "%s/%s" % (self.get_gateway(), self.get_size())
|
||||
|
|
|
|||
Loading…
Reference in New Issue