mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
5263db9dd5
commit
2da98b58c8
1 changed files with 3 additions and 0 deletions
|
@ -1728,6 +1728,9 @@ def is_public_ip(ip):
|
|||
'''
|
||||
Determines whether an IP address falls within one of the private IP ranges
|
||||
'''
|
||||
if ':' in ip:
|
||||
# ipv6
|
||||
return True
|
||||
addr = ip_to_int(ip)
|
||||
if addr > 167772160 and addr < 184549375:
|
||||
# 10.0.0.0/24
|
||||
|
|
Loading…
Add table
Reference in a new issue