[Mono-bugs] [Bug 24666] Changed - Byte order reversed in IPAddress.Parse

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 May 2002 01:59:55 -0000


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 loz@cable.a2000.nl.

http://bugzilla.ximian.com/show_bug.cgi?id=24666

--- shadow/24666	Mon May 13 21:13:29 2002
+++ shadow/24666.tmp.18220	Sat May 18 21:59:55 2002
@@ -1,17 +1,17 @@
 Bug#: 24666
 Product: Mono/Class Libraries
 Version: unspecified
 OS: Red Hat 7.2
 OS Details: 
-Status: NEW   
-Resolution: 
-Severity: 
+Status: RESOLVED   
+Resolution: FIXED
+Severity: Unknown
 Priority: Normal
 Component: System
-AssignedTo: mono-bugs@ximian.com                            
+AssignedTo: dick@ximian.com                            
 ReportedBy: ipmccmono@hotmail.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: Byte order reversed in IPAddress.Parse
@@ -91,6 +91,18 @@
 Additional Information:
 
 GhettoDiff(tm) of IPAddress.cs(151)
 - a |= (long) val << (i << 3);
 + a |= (long) val << (24 - (i << 3 )); // or some expression you like 
 better that does the same thing
+
+------- Additional Comments From loz@cable.a2000.nl  2002-05-18 21:59 -------
+The problem was in IPEndPoint.Serialize and IPEndPoint.Create. Note 
+that IPAddress.Parse is supposed to have it's byte ordering 
+backwards. 
+
+After you get the new code from CVS you'll notice that what is 
+called "theBadSocket" in the example code above works 
+and "theGoodSocket" doesn't. This is how ms.net works as well. 
+
+Greets,
+Lawrence