mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #23802 from gtmanfred/2014.7
if it is ipv6 ip_to_int will fail
This commit is contained in:
commit
f3ca682f92
1 changed files with 3 additions and 0 deletions
|
@ -1785,6 +1785,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