IPv6 issues

Jun 10, 2011 at 10:28 PM

Hey, first of all, I really love Floe. Great work, thanks for it.

However, I've found an issue with it. If you try to connect to a host with only IPv6 addresses assigned (ie ipv6.chat.freenode.net), Floe crashes. This is because the instanciated TcpClient class throws a socket exception (as it's the wrong address family). Would be cool if you could catch that and prevent a crash or - which would be of course much cooler but also some work - add IPv6 support.

Coordinator
Sep 3, 2011 at 7:51 PM

Thanks for reporting this. I'm having a lot of trouble getting a repro, but it's probably because my router doesn't give out IPv6 addresses. I get an error trying to connect to ipv6 servers, but Floe doesn't crash. Socket exceptions should be caught by the network thread, so maybe something else is going on.

Technically, Floe should already support IPv6 (according to the documentation for TcpClient). Unfortunately, this is hard for me to test. 

I will continue looking into it though. If you have the opportunity to get a stack trace from the crash, that might help me.

Sep 13, 2011 at 3:18 PM

The problem is that TcpClient with the default constructor will work as IPv4 only. There's no way I'm aware of to create a hybrid IPv4/v6 socket. By using new TcpClient(AddressFamily.InterNetwork6), you'd have a IPv6 socket.

What crashes now is if a host returns no A (IPv4) records (AAAA and A mixed work), there is no way to connect to the host using IPv4, only IPv6, so new TcpClient(host) throws this address family error. All it'd need would be a try { ... } catch { ... } around the line where client is spawned so that the exception wasn't unhandled. I'm kind of busy currently, but I could create you such a stack trace, or give you RDP access to a machine with IPv6 if that'd help you.