From Dick Porter:
The IPv6 address parser misses some syntax errors, and can become confused by
addresses that at first glance look IPv4 compatible. The attach patch contains
the following fixes:
Don't fail to parse an address if we mistakenly thought it was IPv4 compatible
or mapped, just treat it as IPv6.
Fix IPv4-compatible and mapped address formatting in ToString().
Fix parsing of colons - specifically occurrences of ':::'.
Make sure blocks of digits are no longer than 4 characters.
Add some more parsing tests to Mono's NUnit test suite.
Add a NUnit test for bogus IPv6 addresses.
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
* Uri.cs: Use exception-less operations.
2008-08-06 Miguel de Icaza <[email protected]>
* IPAddress.cs (ParseIPV6): Use an exception-less parser for ipv6
addresses.
* IPv6Address.cs: Rewrite most of the parsing code to not use that
incredibly fragile, hacky and hacky implementation.
(TryParse): Provide a exception-less parsing path.
svn path=/trunk/mcs/; revision=109802
(TryParse): Changed argument name to match MS.
(ParseIPV4): Only treat zero-length or " " address as empty on 1.0
profile. On 2.0 profile, only ignore characters after blank if last
part is valid hex string.
* IPv6Address.cs: Removed extra spaces and tabs.
* IPAddressTest.cs: Remove use of deprecated Assertion. Improved
existing tests.
svn path=/trunk/mcs/; revision=94052
* IPv6Address.cs: Added on overload to ToString to get a the full
length address returned (as required by System.Uri).
svn path=/trunk/mcs/; revision=53066