timmerk / ipaddr-py

Automatically exported from code.google.com/p/ipaddr-py
0 stars 0 forks source link

IPv6 addresses with double colon and embedded IPv4 address not recognized #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ipaddr doesn't support IPv6 addresses that contains both a double colon and an 
embedded IPv4 address. If you try to use one, it's not recognized:

>>> ipaddr.IPAddress("2001:db8::bad:0:0.0.208.13")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ipaddr/__init__.py", line 457, in __repr__
    return '%s(%r)' % (self.__class__.__name__, str(self))
  File "ipaddr/__init__.py", line 460, in __str__
    return  '%s' % self._string_from_ip_int(self._ip)
  File "ipaddr/__init__.py", line 1452, in _string_from_ip_int
    raise ValueError('IPv6 address is too large')
ValueError: IPv6 address is too large

However, if the address doesn't contain ::, it works:

>>> ipaddr.IPAddress("2001:db8:0:0:bad:0:0.0.208.13")
IPv6Address('2001:db8::bad:0:0:d00d')

Original issue reported on code.google.com by lore...@google.com on 13 Aug 2010 at 10:55

GoogleCodeExporter commented 9 years ago

Original comment by ha...@google.com on 30 Sep 2010 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by ha...@google.com on 1 Oct 2010 at 1:00

GoogleCodeExporter commented 9 years ago

Original comment by ha...@google.com on 1 Oct 2010 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by ha...@google.com on 6 Oct 2010 at 4:22