Skip to content

Commit

Permalink
fix: IPAddress.ip_in_subnet without subnet mask (datacenter#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
takishida authored Aug 17, 2024
1 parent eb4d605 commit a0d73a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ def get_network_binary(cls, ip, pfxlen):

@classmethod
def ip_in_subnet(cls, ip, subnet):
if "/" not in subnet:
return False
subnet_ip, subnet_pfxlen = subnet.split("/")
subnet_network = cls.get_network_binary(subnet_ip, subnet_pfxlen)
ip_network = cls.get_network_binary(ip, subnet_pfxlen)
Expand Down

0 comments on commit a0d73a9

Please sign in to comment.