The property was introduced with PR #870 but it missed to convert network byte order to host byte order, so the comparison
wasn't working correctly and the corresponding unit test failed. @marek-safar erroneously "fixed" the test in
27e07c7.
This is the corrected implementation and the original test now works as intended.
public bool IsIPv6Teredo {
get {
return m_Family != AddressFamily.InterNetwork &&
- m_Numbers[0] == 0x2001 &&
+ NetworkToHostOrder ((short) m_Numbers [0]) == 0x2001 &&
m_Numbers[1] == 0;
}
}
[Test]
public void IsIPv6Teredo ()
{
- Assert.IsFalse (IPAddress.Parse ("2001::1").IsIPv6Teredo, "#1");
+ Assert.IsTrue (IPAddress.Parse ("2001::1").IsIPv6Teredo, "#1");
Assert.IsFalse (IPAddress.Parse ("2002::1").IsIPv6Teredo, "#2");
}
#endif