[Mono-bugs] [Bug 63265][Nor] New - When the AddressList for a machine is requested only loopback address is returned

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 17 Aug 2004 20:11:34 -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 martinf@mfconsulting.com.

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

--- shadow/63265	2004-08-17 20:11:34.000000000 -0400
+++ shadow/63265.tmp.11979	2004-08-17 20:11:34.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 63265
+Product: Mono: Runtime
+Version: unspecified
+OS: All
+OS Details: tested on Windows XP, Linux SuSe 9.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: packaging
+AssignedTo: gonzalo@ximian.com                            
+ReportedBy: martinf@mfconsulting.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: When the AddressList for a machine is requested only loopback address is returned
+
+Description of Problem:
+When the AddressList for a machine is requested using Dns.GetHostByName
+only the loopback address is returned.
+
+Given the following console application:
+
+using System;
+using System.Net;
+
+class Class1
+{
+	[STAThread]
+	static void Main(string[] args)	
+	{
+		IPAddress[] iparr;
+		int i = 0;
+		
+		iparr = Dns.GetHostByName(
+			Dns.GetHostName()
+			).AddressList;
+
+		foreach (IPAddress ipA in iparr)	
+		{
+			Console.WriteLine("IP for Interface {0}: {1}",
+				i++, ipA.ToString());
+		}
+	}
+}
+
+Actual Results:
+IP for Interface 0: 127.0.0.2
+
+Expected Results:
+IP for Interface 0: 10.20.70.44
+IP for Interface 1: 10.20.70.43
+
+How often does this happen? 
+Every time this code is executed in Linux
+
+Additional Information:
+The expected results are achieved when the code is compiled and run using
+the MS .NET Framework 1.1 SDK and with Mono 1.0.1 for Win32.  However, the
+actual result is what is obtained when ran in Linux using Mono 1.0