1
Vote

Does not handle Contains() ipv6 properly

description

An exception is thrown inside InternalToUint() when doing the following:
IPNetwork ip = IPNetwork.Parse("::1/32");
IPAddress ip2 = IPAddress.Parse("::1");
bool exists = IPNetwork.Contains(ip, ip2); // throws exception "bytes"
Exception handling leaves little to be desired, but the problem is that it expects a byte count of 4, not 16 in the case of ipv6.

comments