Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comunication with master server uses IPv6 when it is not supported #2822

Closed
DorpsGek opened this issue Apr 9, 2009 · 1 comment
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 9, 2009

bilbo opened the ticket and wrote:

On my system, I have IPv6 support (debian unstable), however due to ISP not supporting IPv6, any IPv6 packets sent to internet basically end up in /dev/null

I started a dedicated server using "./openttd -D" and it seems not to appear in the master list and on console I see this:

dbg: [net] [udp] advertising to master server
dbg: [net] [udp] sendto([master.openttd.org]:3978 (IPv6)) failed with: 101

Seems like it is using IPv6 in the attempts to communicate with master server.

Peeking into sources reveals this call reponsible for communication with master server:

void NetworkUDPAdvertiseThread(void *pntr)
....
NetworkAddress out_addr(NETWORK_MASTER_SERVER_HOST, NETWORK_MASTER_SERVER_PORT);

Looking at definition of NetworkAddress constructor:
NetworkAddress(const char *hostname = "", uint16 port = 0, int family = AF_UNSPEC)

So there seems to be no switch whether to use IPv4 or IPv6 in the attempts to communicate with master server. In my case the "guess" parameter of AF_UNSPEC probably ended up with IPv6 being used instead of IPv4.

I think there should be switch/settings whether openttd will use IPv4, IPv6 or autodetect for all network communication - as in some situations, both IPv4 and IPv6 protocols seems to be available (my machine have IPv4 and IPv6 address), DNS for master.openttd.org will return both A and AAAA records, but ISP tosses IPv6 packets away on their nearest router (which openttd have no chance knowing)

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2822
@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 9, 2009

Rubidium closed the ticket.

Reason for closing: Fixed


This comment was imported from FlySpray: https://bugs.openttd.org/task/2822

@DorpsGek DorpsGek closed this as completed Apr 9, 2009
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant