[Mono-bugs] [Bug 75128][Nor] New - IPAddress.IsLoopback returns
true for non-loopback IPv6 address
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 2 15:48:06 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=75128
--- shadow/75128 2005-06-02 15:48:06.000000000 -0400
+++ shadow/75128.tmp.14074 2005-06-02 15:48:06.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 75128
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: IPAddress.IsLoopback returns true for non-loopback IPv6 address
+
+IPAddress.IsLoopback(IPAddress) returns true for any IPv6 address in the
+form 0:0:0:0::127.x.x.x, while it should in fact only return true for the
+following:
+
+0:0:0:0::0:0:0:1
+
+and
+
+0:0:0:0::127:0:0:1
+
+For MS.NET, this is documented (more or less) here:
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-
+us/cpref/html/frlrfSystemNetIPAddressClassIsLoopbackTopic.asp
+
+To reproduce this issue, compile and execute the following code snippet:
+
+using System;
+using System.Net;
+
+public class EntryPoint {
+ public static void Main() {
+ Console.WriteLine(new Uri("http://[0:0:0:0::127.0.0.1]/").IsLoopback);
+ Console.WriteLine(new Uri("http://0:0:0:0::127.1.2.3]/").IsLoopback);
+ Console.WriteLine(new Uri("http://[0:0:0:0::0.0.0.1]/").IsLoopback);
+ }
+}
+
+Actual result:
+
+True
+True
+True
+
+Expected result:
+
+True
+False
+True
+
+(this is the result you get on MS.NET 1.x and 2.0 beta 2)
More information about the mono-bugs
mailing list