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.
(cherry picked from commit d5c5eb10f8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
859b2150cd
commit
73c30f1baa
|
|
@ -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