summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/ipaddr.py4
-rwxr-xr-xtrunk/ipaddr_test.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/trunk/ipaddr.py b/trunk/ipaddr.py
index a557bbf..63d508b 100644
--- a/trunk/ipaddr.py
+++ b/trunk/ipaddr.py
@@ -1595,6 +1595,10 @@ class _BaseV6(object):
if ip_str.count('.') != 3:
return False
+ # ipaddr should not consider 2001:0::3:4:5:6:7:8 valid
+ if ip_str.count(':') > 7:
+ return False
+
ip_str = self._explode_shorthand_ip_string(ip_str)
# Now that we have that all squared away, let's check that each of the
diff --git a/trunk/ipaddr_test.py b/trunk/ipaddr_test.py
index 64bc2b4..68995a7 100755
--- a/trunk/ipaddr_test.py
+++ b/trunk/ipaddr_test.py
@@ -893,7 +893,7 @@ class IpaddrUnitTest(unittest.TestCase):
'2001:0:0:4:0:0:0:8': '2001:0:0:4::8/128',
'2001:0:0:4:5:6:7:8': '2001::4:5:6:7:8/128',
'2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
- '2001:0::3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
+ '2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
'0:0:3:0:0:0:0:ffff': '0:0:3::ffff/128',
'0:0:0:4:0:0:0:ffff': '::4:0:0:0:ffff/128',
'0:0:0:0:5:0:0:ffff': '::5:0:0:ffff/128',