[Mono-bugs] [Bug 636517] System.Net.Dns doesn't resolve any IPv6 addresses
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Sep 2 17:33:17 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=636517
https://bugzilla.novell.com/show_bug.cgi?id=636517#c1
Gonzalo Paniagua Javier <gonzalo at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #1 from Gonzalo Paniagua Javier <gonzalo at novell.com> 2010-09-02 21:33:16 UTC ---
We were only reporting IPv6 addresses when there were interfaces configured for
it (see getaddrinfo(3) and look for AI_ADDRCONFIG).
This has been changed to match MS behavior (mono-2-6 65be7a38 and master
d6a8c61a).
Note that in order to get IPv6 addresses, you will need to enable IPv6 in the
config file of your application or in the global machine.config, like:
-----------
<configuration>
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
</configuration>
------------
g at t61:/tmp$ cat dns.exe.config
<configuration>
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
</configuration>
gonzalo at t61:/tmp$ cat dns.cs
using System;
using System.Net;
class DNSTest {
static void Main() {
String Hostname = "www.kame.net";
IPAddress[] IPs = Dns.GetHostAddresses(Hostname);
Console.WriteLine("Found {0} IP addresses for {1}",
IPs.Length,Hostname);
foreach (IPAddress i in IPs) {
Console.WriteLine(i.ToString());
}
}
}
g at t61:/tmp$ cat dns.exe.config
<configuration>
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
</configuration>
g at t61:/tmp$ mono dns.exe
Found 2 IP addresses for www.kame.net
203.178.141.194
2001:200:dff:fff1:216:3eff:feb1:44d7
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list