fix
This commit is contained in:
parent
35e8ce60a9
commit
5a4b6be974
1 changed files with 2 additions and 2 deletions
|
@ -34,8 +34,8 @@ def is_valid_public_ipv4(address, allow_localhost: bool = False):
|
|||
if parsed_ip.is_loopback and allow_localhost:
|
||||
return True
|
||||
|
||||
if any(parsed_ip.version != 4, parsed_ip.is_unspecified, parsed_ip.is_link_local, parsed_ip.is_loopback,
|
||||
parsed_ip.is_multicast, parsed_ip.is_reserved, parsed_ip.is_private, parsed_ip.is_reserved):
|
||||
if any((parsed_ip.version != 4, parsed_ip.is_unspecified, parsed_ip.is_link_local, parsed_ip.is_loopback,
|
||||
parsed_ip.is_multicast, parsed_ip.is_reserved, parsed_ip.is_private, parsed_ip.is_reserved)):
|
||||
return False
|
||||
else:
|
||||
return not any((CARRIER_GRADE_NAT_SUBNET.supernet_of(ipaddress.ip_network(f"{address}/32")),
|
||||
|
|
Loading…
Reference in a new issue