[Mono-bugs] [Bug 59320][Maj] New - UDP Packet contains false data
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 30 May 2004 15:05:04 -0400 (EDT)
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 hawke@deltacity.org.
http://bugzilla.ximian.com/show_bug.cgi?id=59320
--- shadow/59320 2004-05-30 15:05:04.000000000 -0400
+++ shadow/59320.tmp.7152 2004-05-30 15:05:04.000000000 -0400
@@ -0,0 +1,78 @@
+Bug#: 59320
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Debian Woody
+OS Details: Bug also appears with Windows (XP in my case)
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: hawke@deltacity.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: UDP Packet contains false data
+
+Description of Problem:
+Sending UDP datagrams containing #FF (as my app should do) does not work
+with Linux (debian) and Windows (XP). My code is compiled with Microsoft
+vbc unter windows and then run with mono. The false behavior does not occur
+when running with .NET RTM but with mono.
+
+Steps to reproduce the problem:
+Here's my code (VB):
+
+Dim Sv As New clsRCon("213.202.216.25", 12005)
+Sv.udpSend("rcon PWD say ""Text to appear in in-game console...""")
+
+Public Class clsRCon
+
+ Public Sck As UdpClient
+ Public rep As Net.EndPoint
+
+ Public Sub New(ByVal HostAddr As String, ByVal Port As Integer)
+
+ rep = New IPEndPoint(IPAddress.Parse(HostAddr), Port)
+ Sck = New UdpClient(HostAddr, Port)
+
+ End Sub
+
+ Public Sub udpSend(ByVal CommandText As String)
+
+ Dim Header As String = Chr(255) & Chr(255) & Chr(255) & ChrW(255) &
+ChrW(2)
+
+
+ Dim TMP As String ' = New String(Chr(255), 4) & Chr(2) &
+CommandText & Chr(0)
+ TMP = Header & CommandText & Chr(0)
+ Dim Buf() As Byte = System.Text.Encoding.Default.GetBytes(TMP)
+
+ Try
+ Sck.Send(Buf, Buf.Length)
+ Catch e As Exception
+ Console.WriteLine(e.ToString())
+ End Try
+
+ End Sub
+
+
+End Class
+
+
+Actual Results:
+The data-part in the datagram starts with:
+#C3#BF#C3#BF#C3#BF#C3#BF#02
+
+As you can see from the sample code the correct data would be:
+#FF#FF#FF#FF#02
+
+How often does this happen?
+Always (spoken for me)
+
+Additional Information:
+I did not test this code with mcs-compiled binaries yet since I would have
+to rewrite the code (will try tomorrow)... But anyway: IL should be IL, right?