Opened 7 years ago

Last modified 2 years ago

#2645 reopened Enhancement

Default to IPv6 when available

Reported by: anonymous Owned by: timothy
Component: Chat Core (General) Version:
Severity: Normal Keywords:
Cc:

Description

When connecting to an IPv6 service, mobile Colloquy defaults to connecting to the IPv4 address.

Non-authoritative answer:
Name:    irc.he.net
Addresses:  2001:470:0:6667::2
          216.218.132.58

Change History (11)

comment:1 Changed 7 years ago by zach

  • Component changed from Colloquy (Mobile) to Chat Core (IRC)
  • Owner changed from kiji.roshi to timothy

comment:2 Changed 5 years ago by zach

  • Resolution set to Fixed
  • Status changed from new to closed

Added in #5578

comment:3 Changed 5 years ago by anonymous

  • Resolution Fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 5 years ago by zach

  • Component changed from Chat Core (IRC) to Chat Core (General)
  • Version 1.3 (iOS) deleted

comment:5 Changed 4 years ago by anonymous

Looks like this is hitting me on OSX 10.8.4 with colloquy 2.4.2.
Connecting to freenode (irc.freenode.net) from a dual stack network will always connect over ipv4.

A quick look with tcpdump shows that no attempt to connect over ipv6 is made, colloquy tries straight over ipv4. (SSL enabled)

$ host irc.freenode.net
irc.freenode.net is an alias for chat.freenode.net.
chat.freenode.net has address 216.155.130.130
chat.freenode.net has address 64.32.24.176
chat.freenode.net has address 78.40.125.4
[...]
chat.freenode.net has address 213.92.8.4
chat.freenode.net has IPv6 address 2a02:2f0d:bff0::81:18:85:57
chat.freenode.net has IPv6 address 2610:150:2c68::d0:dab:1de5
chat.freenode.net has IPv6 address 2001:19f0:feee::dead:beef:cafe
chat.freenode.net has IPv6 address 2001:1418:13:1::25
chat.freenode.net has IPv6 address 2001:6b0:5:1688::200

Expected result: colloquy should try ipv6 results first.

I will try to take a look at the code, but if anyone has a fix, please go ahead. This is especially annoying with ipv4 NATs with short timeouts as it keeps disconnecting my sessions.

comment:6 Changed 4 years ago by anonymous

The code is already there but has been reverted a day after having been pushed.
Could someone reapply #5578 ?

comment:7 Changed 4 years ago by zach

5578 was reverted because it broke ipv4 connections.

comment:8 Changed 4 years ago by anonymous

then please just let the OS decide and try addresses in the order returned by getaddrinfo().

This is what every app should be doing.

comment:9 Changed 4 years ago by zach

While we agree that IPv6 should happen, this is more complicated than "letting the OS decide".

comment:10 Changed 3 years ago by jomo <colloquy@…>

I'm on Dual-Stack Lite (https://en.wikipedia.org/wiki/IPv6_transition_mechanisms#Dual-Stack_Lite_.28DS-Lite.29) network, i.e. full IPv6 but only tunneled IPv4 via a CGNAT.
Sadly my ISP has some issues with IPv4 (yeah, I'm from the future) and I get connection timeouts every 2 minutes in IRC.

A workaround is to use the IPv6 address in the server settings, but that's quite annoying in case the IP changes or when I am on a network that has no IPv6.

Couldn't you just make it a user option to prefer IPv6 (and apply it when available)?

comment:11 Changed 2 years ago by Jen

Apparently the client can not work on IPv6-only networks via NAT64. as there are more and more such networks being deployed - would it be possible to do smth about that?? Before users start looking for another clients (which work)?

Note: See TracTickets for help on using tickets.