robpaveza / jinxbot

Automatically exported from code.google.com/p/jinxbot
0 stars 0 forks source link

Dns.GetHostEntry assumes the first entry is IPv4 #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to connect to localhost using BN#
2. Watch the SocketException fly

What is the expected output? What do you see instead?
Expect to get an IPAddress in Dns.GetHostEntry(server).AddressList[0]
Instead, it's possible to get an IPv6

What version of the product are you using? On what operating system?
BN# Beta2 on Windows Vista

Please provide any additional information below.
It should be possible to iterate the array of IPAddresses and select the
first one with the AddressFamily as InterNetwork

Original issue reported on code.google.com by warrior...@gmail.com on 7 Jan 2009 at 2:28

GoogleCodeExporter commented 9 years ago
Seems that this will happen on a machine with IPv4 and IPv6 addresses enabled, 
I'm
not sure if the burden should be on the server to have two listening sockets, 
or on
the Client to filter out by IPv4.

I'm leaning towards the server now though, since it assures forward 
compatibility
with IPv6. 

Original comment by warrior...@gmail.com on 7 Jan 2009 at 2:36

GoogleCodeExporter commented 9 years ago
Through more investigation, this is still a bug. TcpClient defaults to 
InterNetwork
as the AddressFamily, so even if I updated my server with IPv6 support (Created 
a
separate listener) it still will fail when the DNS tries to resolve.

Original comment by warrior...@gmail.com on 7 Jan 2009 at 2:48

GoogleCodeExporter commented 9 years ago

Original comment by myndf...@valhallalegends.com on 1 Aug 2009 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by myndf...@valhallalegends.com on 15 Jul 2011 at 1:23

GoogleCodeExporter commented 9 years ago
Fixed in r41.

Original comment by myndf...@valhallalegends.com on 15 Jul 2011 at 1:27