Merge pull request #23802 from gtmanfred/2014.7

if it is ipv6 ip_to_int will fail
This commit is contained in:
Justin Findlay 2015-05-15 22:06:59 -06:00
commit f3ca682f92

View file

@ -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